/* Cổng đăng nhập OneCAD Nexus — khuôn chung «Cổng đăng nhập nền tảng» HST-7 (anh Tâm duyệt 18/10/2026; nguồn chuẩn HST-7-cong-dang-nhap.html?s=1,
   cùng khuôn với Portal, Academy, IoT, OneCAD ID). Chỉ áp trong #auth; nền động ở public/gate-bg.js; luồng đăng nhập ở public/app.js (authScreen, oneCadScreen, denied).
   Trang tối sẵn → #auth mang data-no-invert (chế độ tối của app đảo màu cả trang, account-bar.css); ảnh / canvas bên trong không đảo lần hai. */
@font-face{font-family:"Be Vietnam Pro";src:url(/fonts/BeVietnamPro-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Be Vietnam Pro";src:url(/fonts/BeVietnamPro-500.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Be Vietnam Pro";src:url(/fonts/BeVietnamPro-600.woff2) format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"Be Vietnam Pro";src:url(/fonts/BeVietnamPro-700.woff2) format("woff2");font-weight:600 900;font-display:swap}
body.auth-mode{background:#050a14}
#auth[hidden]{display:none!important}
#auth{--a:#7ab8ff;--b:#1f6fd6;--c:#6fa8ff;--s:rgba(20,120,212,.5);--np1:#1478d4;--np2:#8cc8ff;--line:rgba(160,210,240,.14);--mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
 position:relative;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;isolation:isolate;overflow:hidden;
 background:#050a14;color:#eef5fb;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
#auth *,#auth *::before,#auth *::after{box-sizing:border-box}
#auth a{color:inherit;text-decoration:none}
#auth svg{display:block}
html[data-theme=dark] #auth img,html[data-theme=dark] #auth canvas,html[data-theme=dark] #auth [data-no-invert]{filter:none}
#auth .g-tile{display:grid;place-items:center;color:#fff;background:linear-gradient(140deg,var(--a),var(--b));border-radius:10px}
#auth .g-tile svg{width:58%;height:58%}

/* nền: quầng xanh dương + lưới + hoạ tiết mạng dữ liệu (canvas) */
#auth .g-bg{position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:radial-gradient(46% 62% at 70% 46%,color-mix(in srgb,var(--np1) 24%,transparent),transparent 70%),radial-gradient(40% 50% at 96% 6%,rgba(20,120,212,.14),transparent 70%),#050a14}
#auth .g-bg::before{content:"";position:absolute;inset:0;
 background:repeating-linear-gradient(0deg,rgba(120,200,220,.045) 0 1px,transparent 1px 48px),repeating-linear-gradient(90deg,rgba(120,200,220,.045) 0 1px,transparent 1px 48px);
 -webkit-mask:radial-gradient(70% 80% at 60% 45%,#000 30%,transparent 85%);mask:radial-gradient(70% 80% at 60% 45%,#000 30%,transparent 85%)}
#auth .g-bg canvas{position:absolute;inset:0;width:100%;height:100%}
#auth .g-bg::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(5,10,20,.92) 0%,rgba(5,10,20,.6) 36%,rgba(5,10,20,.05) 64%),linear-gradient(180deg,rgba(5,10,20,0) 72%,#050a14 100%)}

/* thanh trên chung */
#auth .g-nav{height:72px;flex:none;display:flex;align-items:center;gap:18px;padding:0 max(32px,calc((100vw - 1296px)/2));
 background:rgba(5,10,20,.72);box-shadow:0 1px 0 rgba(160,210,240,.1);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
#auth .g-home{display:flex}
#auth .g-logo{height:38px;width:auto}
#auth .g-sep{color:#3b5064;font-size:20px;font-weight:300;margin:0 -2px}
#auth .g-plat{display:flex;align-items:center;gap:11px}
#auth .g-plat .g-tile{width:34px;height:34px;border-radius:10px;box-shadow:0 0 0 4px rgba(255,255,255,.05),0 6px 18px var(--s)}
#auth .g-plat b{display:block;font-size:14px;font-weight:600;color:#fff;letter-spacing:-.01em;line-height:1.15}
#auth .g-plat small{display:block;font-size:12px;color:#8fa4b8;line-height:1.3}
#auth .g-sp{flex:1}
#auth .g-back{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:999px;font-size:14px;font-weight:600;color:#e6f0f8;
 border:1px solid rgba(190,225,250,.22);background:rgba(255,255,255,.04)}
#auth .g-back:hover{background:rgba(255,255,255,.08)}
#auth .g-back svg{width:16px;height:16px}

#auth .g-main{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 452px;gap:64px;align-items:start;align-content:center;
 width:100%;max-width:1296px;margin:0 auto;padding:64px 32px 40px}
#auth .g-left{padding-top:6px;max-width:680px}
#auth .g-eyebrow{display:inline-flex;align-items:center;gap:10px;font-family:var(--mono);font-size:11.5px;text-transform:none;
 color:color-mix(in srgb,var(--c) 55%,#fff);padding:7px 14px 7px 11px;border-radius:999px;
 border:1px solid color-mix(in srgb,var(--c) 34%,transparent);background:color-mix(in srgb,var(--c) 8%,transparent)}
#auth .g-eyebrow i{width:7px;height:7px;border-radius:50%;background:var(--c);box-shadow:0 0 10px var(--c)}
#auth .g-left h1{margin:24px 0 0;font-size:50px;line-height:1.04;font-weight:600;letter-spacing:-.035em;color:#fff}
#auth .g-left h1 em{font-style:normal;display:block;background:linear-gradient(95deg,var(--np2),var(--c));-webkit-background-clip:text;background-clip:text;color:transparent;padding-bottom:4px}
#auth .g-lead{margin:18px 0 0;font-size:16px;line-height:1.6;color:#a9bccd;max-width:540px}
#auth .g-bens{list-style:none;margin:24px 0 0;padding:0;display:grid;gap:13px}
#auth .g-bens li{display:flex;gap:12px;align-items:flex-start;font-size:14px;line-height:1.45;color:#dce7f0}
#auth .g-ck{flex:none;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;margin-top:-1px;
 background:color-mix(in srgb,var(--c) 16%,transparent);border:1px solid color-mix(in srgb,var(--c) 42%,transparent);color:var(--np2)}
#auth .g-ck svg{width:12px;height:12px}

/* thẻ khoá học (cùng kiểu mọi cổng) */
#auth .g-slot{margin-top:34px;display:flex;gap:16px;align-items:center;padding:18px 20px;border-radius:18px;max-width:560px;
 background:linear-gradient(180deg,rgba(14,28,48,.72),rgba(8,16,30,.78));border:1px solid var(--line);box-shadow:0 20px 50px -24px rgba(0,0,0,.7);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
#auth .g-si{flex:none;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:var(--np2);
 background:color-mix(in srgb,var(--c) 14%,transparent);border:1px solid color-mix(in srgb,var(--c) 32%,transparent)}
#auth .g-si svg{width:22px;height:22px}
#auth .g-sx{flex:1;min-width:0}
#auth .g-st{white-space:nowrap;display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10.5px;text-transform:none;color:#7f95aa}
#auth .g-st b{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:10.5px;letter-spacing:.08em;font-weight:600;padding:3px 8px;border-radius:6px;background:rgba(243,154,43,.16);color:#ffbf73;border:1px solid rgba(243,154,43,.4)}
#auth .g-slot p{margin:6px 0 0;font-size:14px;font-weight:600;line-height:1.4;color:#fff}
#auth .g-go{flex:none;display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border-radius:10px;font-size:13px;font-weight:600;color:#e6f0f8;
 background:rgba(255,255,255,.05);border:1px solid rgba(190,225,250,.22);white-space:nowrap}
#auth .g-go:hover{background:rgba(255,255,255,.09)}
#auth .g-go svg{width:14px;height:14px}

/* thẻ đăng nhập (452 × 596 ở mọi cổng; cao thêm khi có ô dự phòng / xác thực 2 lớp) */
#auth .g-card{position:relative;width:452px;max-width:none;min-height:596px;margin:0;display:flex;flex-direction:column;padding:30px 32px 26px;border-radius:24px;
 background:linear-gradient(180deg,rgba(16,30,52,.74),rgba(8,16,30,.82));border:1px solid rgba(170,215,245,.18);color:#eef5fb;
 box-shadow:0 40px 90px -36px rgba(0,0,0,.85),0 0 0 1px rgba(255,255,255,.02) inset,0 1px 0 rgba(255,255,255,.07) inset;-webkit-backdrop-filter:blur(22px) saturate(1.2);backdrop-filter:blur(22px) saturate(1.2)}
#auth .g-card::before{content:"";position:absolute;left:28px;right:28px;top:-1px;height:2px;border-radius:2px;background:linear-gradient(90deg,transparent,var(--c),transparent);opacity:.75}
#auth .g-chd{display:flex;align-items:center;gap:12px;margin:0}
#auth .g-chd .g-tile{width:46px;height:46px;border-radius:13px;box-shadow:0 0 0 5px rgba(255,255,255,.05),0 0 30px var(--s)}
#auth .g-k{font-family:var(--mono);font-size:10.5px;text-transform:none;color:#7f95aa;line-height:1.5}
#auth .g-k b{display:block;color:color-mix(in srgb,var(--c) 55%,#fff);font-weight:500}
#auth .g-card h2{margin:20px 0 0;font-size:24px;white-space:nowrap;line-height:1.18;font-weight:600;letter-spacing:-.025em;color:#fff}
#auth .g-card h2 em{font-style:normal;background:linear-gradient(95deg,var(--np2),var(--c));-webkit-background-clip:text;background-clip:text;color:transparent}
#auth .g-sub{margin:8px 0 0;font-size:14px;line-height:1.55;color:#a9bccd;min-height:44px}
#auth .oid{margin:0}
#auth .g-btn-id{margin-top:20px;height:54px;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:11px;font-size:16px;font-weight:600;color:#fff;
 background:linear-gradient(100deg,#1478d4,#1fb5a0);box-shadow:0 10px 30px -8px rgba(31,181,160,.6),inset 0 1px 0 rgba(255,255,255,.25)}
#auth a.g-btn-id,#auth a.g-btn-id:visited{color:#fff}
#auth .g-btn-id:hover{filter:brightness(1.06)}#auth .g-btn-id:focus-visible{outline:3px solid rgba(31,181,160,.5);outline-offset:3px}
#auth .g-btn-id svg{width:18px;height:18px}
#auth .g-ways{margin-top:16px}
#auth .g-wl{display:flex;align-items:center;gap:10px;font-size:11.5px;color:#7f95aa}
#auth .g-wl::before,#auth .g-wl::after{content:"";flex:1;height:1px;background:var(--line)}
#auth .g-chips{margin-top:12px;display:grid;grid-template-columns:repeat(5,1fr);gap:7px}
#auth .g-chip{height:58px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
 background:rgba(255,255,255,.035);border:1px solid rgba(190,225,250,.14);font-size:11px;font-weight:600;color:#cfdbe6;text-align:center;line-height:1.1}
#auth .g-chip svg{width:17px;height:17px}
#auth .g-note{margin-top:16px;display:flex;gap:11px;align-items:flex-start;padding:13px 14px;border-radius:12px;min-height:68px;
 background:color-mix(in srgb,var(--c) 8%,rgba(8,16,30,.5));border:1px solid color-mix(in srgb,var(--c) 26%,transparent)}
#auth .g-note svg{flex:none;width:17px;height:17px;color:var(--np2);margin-top:1px}
#auth .g-note span{font-size:13px;line-height:1.5;color:#c9d7e3}
#auth .g-note b{color:#fff;font-weight:600}
#auth .g-btn-sec{margin-top:12px;height:46px;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:9px;font-size:14px;font-weight:600;color:#e6f0f8;
 background:rgba(255,255,255,.04);border:1px solid rgba(190,225,250,.24)}
#auth .g-btn-sec:hover{background:rgba(255,255,255,.08)}
#auth .g-btn-sec svg{width:16px;height:16px}
#auth .g-cft{margin-top:auto;padding-top:14px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px;line-height:1.5;color:#7f95aa}
#auth .g-cft svg{flex:none;width:18px;height:18px;color:#6fd0bf}
#auth .g-cft b{color:#cfe3f0;font-weight:600}
#auth .g-note[hidden],#auth .oid[hidden],#auth .oid-denied[hidden],#auth .g-btn-sec[hidden]{display:none}

/* đăng nhập dự phòng (máy chủ chưa bật «chỉ OneCAD ID», khởi tạo lần đầu), QR điện thoại, xác thực 2 lớp, Site khoá — kín đáo, cùng tông tối */
#auth .g-card form{margin-top:18px;display:grid;gap:12px}
#auth .g-card label{display:grid;gap:6px;font-size:12.5px;font-weight:600;color:#a9bccd}
#auth .g-card input{width:100%;min-height:44px;padding:0 12px;border-radius:11px;border:1px solid rgba(190,225,250,.2);background:rgba(255,255,255,.04);color:#eef5fb;font:inherit;font-size:14px}
#auth .g-card input::placeholder{color:#5d7186}
#auth .g-card input:focus{outline:none;border-color:var(--c);box-shadow:0 0 0 3px color-mix(in srgb,var(--c) 22%,transparent)}
#auth .g-card .auth-password{display:flex;gap:6px}#auth .g-card .auth-password button{flex:none;padding:0 12px;border-radius:11px;border:1px solid rgba(190,225,250,.2);background:rgba(255,255,255,.04);color:#cfdbe6;font:inherit;font-size:13px}
#auth .g-card .primary{height:46px;width:100%;border:0;border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font:inherit;font-weight:600;font-size:14px;justify-content:center}
#auth .g-card .primary:hover{background:rgba(255,255,255,.13)}
#auth .g-card .form-error{color:#ff9b85;font-size:13px;margin:0}
#auth .g-card .form-error:empty{display:none}
#auth .g-card .auth-link{background:none;border:0;color:#8cc8ff;font:inherit;font-size:13px;font-weight:600;margin:10px auto 0;cursor:pointer}
#auth .g-card .muted{color:#8fa4b8}
#auth .g-card .auth-note{font-size:12px;color:#8fa4b8;line-height:1.6;margin:12px 0 0}#auth .g-card .auth-note:empty{display:none}
#auth .auth-mobile{margin-top:18px;color:#c9d7e3}#auth .auth-mobile h3{margin:0 0 8px;font-size:16px;color:#fff}#auth .auth-mobile ol{margin:0 0 10px;padding-left:20px;line-height:1.5;font-size:13px}
#auth .auth-mobile video{width:100%;max-height:60vh;border-radius:12px;margin-top:10px;background:#000}
#auth .oid-denied{margin-top:4px;color:#c9d7e3}
#auth .oid-denied h2{margin:18px 0 0;font-size:24px;line-height:1.25;white-space:normal}
#auth .oid-lock{margin-top:22px;display:grid;place-items:center;width:52px;height:52px;border-radius:15px;background:rgba(243,154,43,.14);color:#ffbf73;border:1px solid rgba(243,154,43,.35)}
#auth .oid-who{display:flex;align-items:center;gap:14px;margin-top:18px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.03)}
#auth .oid-who>span:nth-child(2){display:flex;flex-direction:column;min-width:0;flex:1}#auth .oid-who b{color:#fff}#auth .oid-who small{color:#8fa4b8;font-size:12.5px;overflow-wrap:anywhere}
#auth .oid-av{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:linear-gradient(140deg,#1478d4,#1fb5a0);color:#fff;font-weight:600;font-size:13px}
#auth .oid-copy{margin:16px 0 0;color:#a9bccd;font-size:14px;line-height:1.65}#auth .oid-copy b{color:#fff}
#auth .oid-acts{display:flex;gap:10px;margin-top:22px}
#auth .oid-acts .oid-btn{flex:1;display:flex;align-items:center;justify-content:center;height:48px;border-radius:12px;background:linear-gradient(100deg,#1478d4,#1fb5a0);color:#fff;font-weight:600;font-size:14px}
#auth .oid-home{flex:0 0 132px;display:grid;place-items:center;height:48px;border:1px solid rgba(190,225,250,.24);border-radius:12px;color:#e6f0f8;font-weight:600;background:rgba(255,255,255,.04)}
#auth .g-card .tf-who{color:#c9d7e3}

#auth .g-foot{flex:none;height:56px;display:flex;align-items:center;gap:22px;padding:0 max(32px,calc((100vw - 1296px)/2));border-top:1px solid rgba(160,210,240,.08);
 font-size:13px;color:#7f95aa;background:rgba(4,8,16,.6)}
#auth .g-foot a:hover{color:#fff}

/* điện thoại */
@media (max-width:760px){
 #auth .g-nav{height:60px;gap:10px;padding:0 16px}
 #auth .g-logo{height:30px}
 #auth .g-plat .g-tile{width:30px;height:30px;border-radius:9px}
 #auth .g-plat b{font-size:14px}#auth .g-plat small{display:none}
 #auth .g-back{width:40px;padding:0;justify-content:center}#auth .g-back span{display:none}

 #auth .g-bg::after{background:linear-gradient(180deg,rgba(5,10,20,.55) 0%,rgba(5,10,20,.82) 50%,#050a14 100%)}
 #auth .g-main{display:flex;flex-direction:column;gap:0;padding:28px 16px 28px}
 #auth .g-left{display:contents}
 #auth .g-eyebrow{font-size:10px;letter-spacing:.12em;align-self:flex-start;order:1}
 #auth .g-left h1{font-size:24px;margin-top:18px;order:2}
 #auth .g-lead{display:none}
 #auth .g-card{order:3;width:100%;min-height:0;margin-top:22px;padding:24px 20px 20px}
 #auth .g-card h2{font-size:20px;white-space:normal}
 #auth .g-sub{min-height:0}
 #auth .g-note{min-height:66px}
 #auth .g-btn-sec{font-size:13px;padding:0 10px;gap:7px}
 #auth .g-bens{order:4;margin-top:26px;gap:10px}#auth .g-bens li{font-size:14px}
 #auth .g-slot{order:5;margin-top:20px;flex-wrap:wrap}
 #auth .g-go{width:100%;justify-content:center}
 #auth .g-chips{gap:6px}#auth .g-chip{height:56px;font-size:10.5px}
 #auth .g-foot{height:auto;flex-wrap:wrap;gap:8px 16px;padding:18px 16px;justify-content:center}#auth .g-foot .g-sp{display:none}
 #auth .g-cp{width:100%;text-align:center}
 #auth .oid-acts{flex-direction:column}#auth .oid-home{flex:none}
}
/* Đăng nhập bằng tài khoản tổ chức (ảnh GN-6, 04/11/2026) — public/sso-login.js */
.ss-login{margin:10px 0 4px}.ss-open{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:42px;border:1px solid #e4e4e7;border-radius:10px;background:#fff;font:inherit;font-weight:600;font-size:14px;color:#3f3f46;cursor:pointer}
.ss-open svg,.ss-go svg,.ss-inline svg{width:17px;height:17px;flex:none}.ss-open:hover{background:#f9fafb}
.ss-form{display:grid;gap:8px;margin-top:10px}.ss-form label{display:grid;gap:6px;font-size:13px;font-weight:600;color:#3f3f46}.ss-form input{height:40px;border:1px solid #e4e4e7;border-radius:9px;padding:0 12px;font:inherit}
.ss-go{display:flex;align-items:center;justify-content:center;gap:8px;height:42px;border-radius:10px;border:0;background:#2563eb;color:#fff;font:inherit;font-weight:600;cursor:pointer}.ss-msg{margin:0;color:#71717a;font-size:12.5px}.ss-msg:empty{display:none}
.ss-inline{display:flex;align-items:center;gap:8px;margin:-2px 0 8px;padding:8px 12px;border-radius:9px;background:#eff4ff;color:#1d4ed8;font-weight:600;font-size:13px;text-decoration:none}
