/* ============================================================================
   /login — giao diện sáng, màu xanh dương HTIT (#436AB3 → #1F457F theo logo).
   Màu cố định (không theo token chế độ tối/ngoài trời): trang đăng nhập luôn sáng.
   Bấm khiên ⇒ ô #lg-open bật ⇒ các biểu tượng giãn ra, khiên thu lại, form hiện ở giữa (chỉ CSS).
   ============================================================================ */
.lg {
    --lg-bg: #f6f7fa; --lg-bg2: #eef1f6; --lg-line: #e3e7ee; --lg-line2: #d5dbe5;
    --lg-ink: #10213a; --lg-ink2: #3c4b62; --lg-muted: #6b7890;
    --lg-b: #2f5fb3; --lg-b2: #1f457f; --lg-bsoft: #ebf1fb;
    --lg-ease: cubic-bezier(.22, 1, .36, 1);
    position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    color: var(--lg-ink); background: var(--lg-bg); overflow-x: hidden; isolation: isolate; color-scheme: light;
    font-family: 'Barlow', system-ui, Arial, sans-serif;
}
.lg::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background: radial-gradient(680px 520px at 74% 44%, #dbe7fa 0, #dbe7fa00 70%),
                radial-gradient(600px 480px at 6% 92%, #e6ecf6 0, #e6ecf600 70%),
                linear-gradient(180deg, #fbfbfd, var(--lg-bg));
}
.lg::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55; pointer-events: none;
    background-image: linear-gradient(#10213a0a 1px, transparent 1px), linear-gradient(90deg, #10213a0a 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 62% 45%, #000 20%, transparent 72%);
    mask-image: radial-gradient(ellipse at 62% 45%, #000 20%, transparent 72%);
}
.lg-toggle { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }

/* ---- Thanh trên ---- */
.lg-top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left));
}
.lg-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lg-brand img { display: block; height: 28px; width: auto; }
.lg-brand i { width: 1px; height: 26px; background: var(--lg-line2); }
.lg-brand strong { font-size: 19px; font-weight: 800; letter-spacing: -.2px; white-space: nowrap; }
.lg .lsw-light { background: #fff; border-color: var(--lg-line2); box-shadow: 0 4px 14px -8px #10213a40; color: var(--lg-b2); }
.lg .lsw-light .lsw-b { color: var(--lg-b2); }
.lg .lsw-light .lsw-b:hover { background: var(--lg-bg2); }
.lg .lsw-light .lsw-b.on { background: var(--lg-b); color: #fff; box-shadow: none; }

/* ---- Thân trang ---- */
.lg-main {
    flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; align-content: start;
    width: 100%; max-width: 1360px; margin: 0 auto;
    padding: 12px max(20px, env(safe-area-inset-right)) 40px max(20px, env(safe-area-inset-left));
}
.lg-copy { min-width: 0; }
.lg-chip {
    display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 10px; border-radius: 999px;
    background: #fff; border: 1px solid var(--lg-line); box-shadow: 0 4px 14px -8px #10213a33;
    font-size: 13px; font-weight: 600; color: var(--lg-ink2);
}
.lg-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--lg-b); box-shadow: 0 0 0 4px var(--lg-bsoft); }
.lg-title { margin: 16px 0 12px; font-size: clamp(32px, 4.6vw, 68px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.lg-title em { display: block; font-style: normal; color: var(--lg-b); }
.lg-lead { margin: 0; max-width: 520px; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; color: var(--lg-ink2); }
.lg-cta {
    display: inline-flex; align-items: center; gap: 10px; height: 50px; margin-top: 26px; padding: 0 22px 0 24px;
    border-radius: 999px; background: var(--lg-b); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer;
    box-shadow: 0 12px 24px -12px #2f5fb3; transition: background .25s, transform .25s;
}
.lg-cta svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.lg-cta:hover { background: var(--lg-b2); transform: translateY(-2px); }
.lg-cta:hover svg { transform: translate(2px, -2px); }
.lg-toggle:checked ~ .lg-main .lg-cta { opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }   /* đang mở: bấm lại sẽ đóng ⇒ ẩn */

/* ---- Minh hoạ: khiên HSSE nối các trụ cột ---- */
.lg-visual { position: relative; width: min(100%, 360px); aspect-ratio: 1; justify-self: center; }
.lg-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 50%; transition: transform .7s var(--lg-ease), opacity .5s; }
.lg-links path { fill: none; stroke-linecap: round; }
.lg-base path { stroke: #2f5fb340; stroke-width: 2; }
.lg-flow path { stroke: var(--lg-b); stroke-width: 2.5; stroke-dasharray: 6 22; animation: lg-flow 2.4s linear infinite; filter: drop-shadow(0 0 4px #2f5fb399); }
.lg-orbit { fill: none; stroke: #10213a14; stroke-width: 1.5; stroke-dasharray: 3 9; }

.lg-core {
    position: absolute; z-index: 3; left: 50%; top: 50%; width: 44%; transform: translate(-50%, -50%);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: transform .6s var(--lg-ease), opacity .4s, visibility .6s;
}
.lg-shield { position: relative; z-index: 2; display: block; width: 78%; margin: 0 auto; filter: drop-shadow(0 22px 22px #1a3a6c40); animation: lg-bob 5s ease-in-out infinite; transition: scale .3s var(--lg-ease); }
.lg-core:hover .lg-shield { scale: 1.06; }
.lg-tick { filter: drop-shadow(0 3px 2px #0f264766); }
.lg-ring { position: absolute; z-index: 1; left: 50%; top: 42%; width: 92%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #2f5fb366; animation: lg-ring 2.4s ease-out infinite; pointer-events: none; }
.lg-toggle:focus-visible ~ .lg-main .lg-ring { border: 3px solid var(--lg-b); animation: none; }
.lg-hint {
    position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); z-index: 3;
    padding: 5px 12px; border-radius: 999px; background: var(--lg-b2); color: #fff; white-space: nowrap;
    font-size: 12.5px; font-weight: 700; box-shadow: 0 8px 18px -8px #1f457f;
}
.lg-hint::before { content: ""; position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.lg-pad {
    position: absolute; left: 50%; transform: translateX(-50%); border-radius: 50%;
    background: radial-gradient(ellipse at 50% 35%, #fff 0, #e8ecf2 55%, #cfd6e0 100%);
    box-shadow: 0 10px 18px -6px #10213a40, inset 0 -3px 0 #c3cbd7;
}
.lg-pad-core { width: 118%; aspect-ratio: 3.2; bottom: -11%; z-index: 1; box-shadow: 0 22px 40px -12px #10213a55, inset 0 -6px 0 #c3cbd7, 0 0 0 8px #ffffff80; }
.lg-pad-core i { position: absolute; inset: 16% 18%; border-radius: 50%; background: radial-gradient(ellipse, #5b8ad6 0, #2f5fb355 45%, #2f5fb300 72%); filter: blur(4px); animation: lg-glow 3s ease-in-out infinite; }

.lg-node {
    position: absolute; z-index: 2; width: 86px; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center;
    animation: lg-bob 6s ease-in-out infinite; transition: left .7s var(--lg-ease), top .7s var(--lg-ease), opacity .5s;
}
.lg-tile {
    position: relative; z-index: 2; width: 62px; height: 62px; border-radius: 17px; display: grid; place-items: center;
    background: linear-gradient(160deg, #fff, #eef1f6); border: 1px solid #fff;
    box-shadow: 0 2px 0 #fff inset, 0 -4px 0 #d7dde7 inset, 0 14px 24px -10px #10213a55;
}
.lg-tile svg { width: 30px; height: 30px; fill: none; stroke: var(--lg-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lg-tile .ac { stroke: var(--lg-b); stroke-width: 2; }
.lg-node .lg-pad { position: relative; left: auto; transform: none; width: 74px; height: 20px; margin-top: -9px; }
.lg-node > span {
    margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--lg-line);
    font-size: 12px; font-weight: 700; color: var(--lg-ink2); white-space: nowrap; box-shadow: 0 4px 10px -6px #10213a33;
}
/* Vị trí đóng (quanh khiên) → mở (giãn ra ×1.35 từ tâm — khớp với .lg-links scale 1.35) */
.lg-node.n1 { left: 22%; top: 23%; animation-delay: -1s; }
.lg-node.n2 { left: 76%; top: 14%; animation-delay: -2.5s; }
.lg-node.n3 { left: 88.3%; top: 43.7%; animation-delay: -.4s; }
.lg-node.n4 { left: 79%; top: 75.3%; animation-delay: -3.6s; }
.lg-node.n5 { left: 42%; top: 88.3%; animation-delay: -1.8s; }
.lg-node.n6 { left: 12%; top: 62%; animation-delay: -4.4s; }
.lg-toggle:checked ~ .lg-main .lg-node.n1 { left: 12.2%; top: 13.6%; }
.lg-toggle:checked ~ .lg-main .lg-node.n2 { left: 85.1%; top: 1.4%; }
.lg-toggle:checked ~ .lg-main .lg-node.n3 { left: 101.7%; top: 41.5%; }
.lg-toggle:checked ~ .lg-main .lg-node.n4 { left: 89.2%; top: 84.2%; }
.lg-toggle:checked ~ .lg-main .lg-node.n5 { left: 39.2%; top: 101.7%; }
.lg-toggle:checked ~ .lg-main .lg-node.n6 { left: -1.3%; top: 66.2%; }
.lg-toggle:checked ~ .lg-main .lg-links { transform: scale(1.35); opacity: .7; }
.lg-toggle:checked ~ .lg-main .lg-core { transform: translate(-50%, -50%) scale(.35); opacity: 0; visibility: hidden; }

/* ---- Thẻ đăng nhập: hiện ở giữa khi mở ---- */
.lg-card {
    position: absolute; z-index: 4; left: 50%; top: 50%; width: min(330px, 100%); padding: 22px 22px 20px;
    border-radius: 20px; background: #fff; border: 1px solid var(--lg-line); overflow: hidden;
    box-shadow: 0 1px 2px #10213a0d, 0 30px 60px -24px #10213a66, 0 0 0 8px #ffffff99;
    transform: translate(-50%, -50%) scale(.85); opacity: 0; visibility: hidden;
    transition: transform .55s var(--lg-ease), opacity .35s, visibility .55s;
}
.lg-toggle:checked ~ .lg-main .lg-card { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; transition-delay: .12s; }
.lg-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--lg-b2), #7fa3e0); }
.lg-close {
    position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center;
    border-radius: 10px; color: #8a97ab; cursor: pointer; transition: background .2s, color .2s;
}
.lg-close svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lg-close:hover { background: var(--lg-bg2); color: var(--lg-ink); }
.lg-card-ic { display: block; width: 30px; margin-bottom: 10px; }
.lg-card-ic svg { display: block; width: 100%; }
.lg-card h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--lg-ink); }
.lg-note { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--lg-muted); }
.lg-form { display: grid; gap: 12px; margin-top: 16px; }
.lg-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--lg-ink2); }
.lg-in { position: relative; display: block; }
.lg-in > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8c9ab0; pointer-events: none; }
.lg-in input {
    width: 100%; height: 44px; padding: 0 44px 0 40px; border: 1.5px solid var(--lg-line); border-radius: 12px;
    background: var(--lg-bg); color: var(--lg-ink); font: inherit; font-size: 16px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.lg-in input:hover { border-color: var(--lg-line2); }
.lg-in input:focus, .lg-in input:focus-visible { outline: 0; background: #fff; border-color: var(--lg-b); box-shadow: 0 0 0 4px #2f5fb324; }
.lg-in:focus-within > svg { color: var(--lg-b); }
.lg-pw {
    position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
    display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: #8c9ab0; cursor: pointer;
}
.lg-pw:hover { background: var(--lg-bg2); color: var(--lg-b2); }
.lg-pw[aria-pressed="true"] { color: var(--lg-b); }
.lg-pw .pw-ico-show, .lg-pw .pw-ico-hide { display: contents; }
.lg-pw .pw-ico-hide, .lg-pw[aria-pressed="true"] .pw-ico-show { display: none; }
.lg-pw[aria-pressed="true"] .pw-ico-hide { display: contents; }
.lg .auth-caps { color: #b45309; font-size: 12px; }
.lg-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; margin-top: 6px;
    border: 0; border-radius: 12px; background: var(--lg-b); color: #fff; font: inherit; font-size: 16px; font-weight: 800;
    box-shadow: 0 10px 20px -10px #2f5fb3cc; cursor: pointer; transition: background .2s, transform .2s;
}
.lg-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.lg-btn:hover { background: var(--lg-b2); }
.lg-btn:hover svg { transform: translateX(3px); }
.lg-btn:active { transform: translateY(1px); }
.lg-btn:disabled { opacity: .75; cursor: progress; }
.lg-btn.busy .rc-spin { display: inline-block; margin: 0; }
.lg-btn.busy svg { display: none; }
.lg-err { margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: #fdecea; border: 1px solid #f2c1bb; color: #b03a2e; font-size: 13px; font-weight: 600; line-height: 1.5; }

/* ---- Chân trang ---- */
.lg-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px;
    padding: 14px max(20px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    border-top: 1px solid var(--lg-line); background: #ffffffb3; font-size: 12.5px; color: var(--lg-muted);
}
.lg-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--lg-ink2); font-weight: 700; text-decoration: none; }
.lg-foot a:hover { color: var(--lg-b); }

@keyframes lg-flow { to { stroke-dashoffset: -28; } }
@keyframes lg-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes lg-glow { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes lg-ring { 0% { transform: translate(-50%, -50%) scale(.85); opacity: .9; } 100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .lg-flow path, .lg-shield, .lg-node, .lg-pad-core i, .lg-ring { animation: none; }
    .lg-node, .lg-links, .lg-core, .lg-card { transition-duration: .01s; transition-delay: 0s !important; }
}

/* ---- Desktop: chữ trái, minh hoạ + form phải ---- */
@media (min-width: 1000px) {
    .lg-top { padding: 22px clamp(28px, 4vw, 56px); }
    .lg-brand img { height: 32px; }
    .lg-brand strong { font-size: 21px; }
    .lg-main { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 40px; align-content: center; padding: 30px clamp(28px, 4vw, 56px) 70px; }
    .lg-visual { width: min(100%, 540px); }
    .lg-foot { justify-content: space-between; padding: 14px clamp(28px, 4vw, 56px); }
}
@media (min-width: 1000px) and (max-height: 800px) {
    .lg-title { font-size: clamp(30px, 3.8vw, 54px); }
    .lg-visual { width: min(100%, 460px); }
}
/* ---- Điện thoại: khi mở, biểu tượng bay ra & mờ dần, form nằm giữa khung minh hoạ ---- */
@media (max-width: 699px) {
    .lg-cta { width: 100%; justify-content: center; margin-top: 20px; }
    .lg-toggle:checked ~ .lg-main .lg-visual { aspect-ratio: auto; min-height: 360px; display: grid; place-items: center; }
    .lg-toggle:checked ~ .lg-main .lg-card { position: relative; left: auto; top: auto; transform: none; width: 100%; max-width: 380px; }
    .lg-card { transform: translate(-50%, -50%) scale(.85); }
    .lg-toggle:checked ~ .lg-main .lg-node { opacity: 0; }
    .lg-toggle:checked ~ .lg-main .lg-links { transform: scale(1.6); opacity: 0; }
    .lg-toggle:checked ~ .lg-main .lg-cta { display: none; }
    .lg-hint { display: none; }   /* khổ nhỏ: đè lên biểu tượng — đã có nút "Đăng nhập hệ thống" */
}
@media (max-width: 560px) {
    .lg-brand { gap: 9px; }
    .lg-brand img { height: 22px; }
    .lg-brand i { height: 20px; }
    .lg-brand strong { font-size: 16px; }
    .lg-chip { font-size: 11.5px; }
    .lg-title { font-size: 31px; margin-top: 12px; }
    .lg-lead { font-size: 14.5px; }
    .lg-visual { width: min(100%, 330px); }
    .lg-node { width: 62px; }
    .lg-tile { width: 46px; height: 46px; border-radius: 13px; }
    .lg-tile svg { width: 22px; height: 22px; }
    .lg-node .lg-pad { width: 54px; height: 15px; margin-top: -7px; }
    .lg-node > span { font-size: 10.5px; padding: 2px 8px; }
}
