:root{
  --qc-red:#8f0007;--qc-red-2:#a91616;--qc-red-3:#760009;--qc-bg:#f6f8ff;--qc-ink:#142033;--qc-muted:#6f625f;
  --qc-line:#dce6f7;--qc-soft:#eff4ff;--qc-soft-2:#e8f0ff;--qc-green:#16b48a;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body.qc-login-page{min-height:100vh;background:linear-gradient(180deg,#fafbff 0%,#f3f6ff 100%);color:var(--qc-ink);display:flex;flex-direction:column;overflow-x:hidden}
.qc-login-topbar{height:54px;flex:0 0 54px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;background:rgba(255,255,255,.9);border-bottom:1px solid #e7ecf6;backdrop-filter:blur(12px);position:relative;z-index:5}
.qc-login-brandline,.qc-login-status{display:flex;align-items:center;gap:12px;min-width:0}
.qc-top-mark{width:26px;height:26px;object-fit:contain}
.qc-login-brandline strong{font-size:16px;color:#8f0d17;letter-spacing:-.02em;white-space:nowrap}
.qc-top-dot{width:5px;height:5px;border-radius:50%;background:#dfc4c0}
.qc-top-desc{font-size:12px;color:#756a67;white-space:nowrap}
.qc-status-pill{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border-radius:999px;background:#eaf2ff;color:#334155;font-size:11px;font-weight:600}
.qc-status-pill i{width:8px;height:8px;border-radius:50%;background:var(--qc-green);box-shadow:0 0 0 3px rgba(22,180,138,.08)}
.qc-help{font-size:12px;color:#6d5c57;font-weight:600}
.qc-login-main{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:34px 24px;position:relative;overflow:hidden}
.qc-ambient{position:absolute;width:360px;height:360px;border-radius:50%;filter:blur(70px);opacity:.22;pointer-events:none}
.qc-ambient-a{left:-140px;top:-130px;background:#d21f2b}
.qc-ambient-b{right:-130px;bottom:-150px;background:#56aef5}
.qc-auth-card{width:min(1200px,100%);min-height:700px;display:grid;grid-template-columns:42% 58%;background:#fff;border:1px solid #dbe5f4;border-radius:18px;overflow:hidden;box-shadow:0 24px 60px rgba(24,37,63,.12);position:relative;z-index:1}
.qc-auth-hero{position:relative;overflow:hidden;background:linear-gradient(145deg,#9f1717 0%,#8c0e12 52%,#730007 100%);color:#fff;padding:54px 56px;display:flex;flex-direction:column;justify-content:space-between}
.qc-grid-pattern{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);background-size:28px 28px;opacity:.55}
.qc-hero-glow{position:absolute;right:-100px;bottom:-100px;width:320px;height:320px;border-radius:50%;background:rgba(255,255,255,.08);filter:blur(45px)}
.qc-hero-top,.qc-hero-bottom{position:relative;z-index:2}
.qc-logo-box{width:136px;height:136px;border-radius:24px;background:#fff;padding:12px;display:flex;align-items:center;justify-content:center;box-shadow:0 14px 30px rgba(34,0,0,.28),0 0 0 5px rgba(255,255,255,.16);margin-bottom:34px}
.qc-logo-box img{width:100%;height:100%;object-fit:contain}
.qc-internal-pill{display:inline-flex;align-items:center;gap:8px;padding:6px 13px;border-radius:999px;background:rgba(255,255,255,.13);font-size:11px;font-weight:800;letter-spacing:.05em}
.qc-internal-pill span{width:7px;height:7px;border-radius:50%;background:#fff}
.qc-auth-hero h1{margin:22px 0 6px;font-size:40px;line-height:1.05;letter-spacing:-.04em;font-weight:850}
.qc-auth-hero h2{margin:0;font-size:20px;line-height:1.35;font-weight:600;color:rgba(255,255,255,.92)}
.qc-hero-rule{width:62px;height:4px;border-radius:999px;background:rgba(255,255,255,.38);margin:28px 0}
.qc-auth-hero p{margin:0;max-width:420px;font-size:15px;line-height:1.75;color:rgba(255,255,255,.84)}
.qc-hero-bottom{padding-top:28px;border-top:1px solid rgba(255,255,255,.2)}
.qc-thriving{display:flex;align-items:center;gap:10px;font-size:15px}
.qc-thriving span{font-size:18px}
.qc-hero-quote{margin-top:14px!important;font-size:13px!important;font-style:italic}
.qc-hero-meta{display:flex;align-items:center;gap:12px;margin-top:18px;color:rgba(255,255,255,.66);font-size:11px}
.qc-hero-meta b{font-weight:400}
.qc-auth-form{padding:58px 66px 40px;display:flex;flex-direction:column;justify-content:center;background:linear-gradient(135deg,#fff 0%,#fff 74%,#eff7ff 100%)}
.qc-form-head{max-width:650px}
.qc-workspace-label{display:flex;align-items:center;gap:8px;color:#8f0d17;font-size:11px;font-weight:850;letter-spacing:.11em}
.qc-form-head h2{margin:16px 0 8px;font-size:36px;line-height:1.05;letter-spacing:-.04em}
.qc-form-head p{margin:0 0 30px;color:#6f625f;font-size:14px;line-height:1.6}
.qc-login-error{margin:-12px 0 18px;padding:11px 13px;border:1px solid #ffd0d4;border-radius:10px;background:#fff1f2;color:#a30d1d;font-size:12px;font-weight:700}
.qc-login-form{display:grid;gap:14px}
.qc-login-form label{font-size:12px;font-weight:750;color:#28384d}
.qc-login-form label span{color:#b91c1c}
.qc-field{position:relative}
.qc-field-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:24px;text-align:center;color:#786a66;font-size:20px;font-weight:700;pointer-events:none}
.qc-field input{width:100%;height:54px;margin:0;border:1px solid #cad9f3;border-radius:11px;background:#eff4ff;padding:0 46px 0 50px;color:#172033;font:inherit;font-size:14px;outline:none;transition:.18s ease;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.qc-field input::placeholder{color:#9aa7b8}
.qc-field input:focus{background:#fff;border-color:#98151b;box-shadow:0 0 0 3px rgba(143,0,7,.08)}
.qc-password-row{display:flex;align-items:center;justify-content:space-between;margin-top:2px}
.qc-password-help{font-size:10px;color:#9b8c88;font-weight:600}
.qc-password-toggle{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;background:transparent;border-radius:8px;color:#786a66;font-size:18px;cursor:pointer}
.qc-password-toggle:hover{background:#e4ecfa;color:#8f0d17}
.qc-login-submit{margin-top:6px;height:56px;border:0;border-radius:11px;background:linear-gradient(90deg,#8f0007,#a10910);color:#fff;font:inherit;font-size:16px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:10px;cursor:pointer;box-shadow:0 8px 18px rgba(118,0,9,.18);transition:.18s ease}
.qc-login-submit:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(118,0,9,.24)}
.qc-login-submit:disabled{cursor:wait;opacity:.88;transform:none}
.qc-login-submit b{font-size:20px;font-weight:700}
.qc-spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:qc-spin .7s linear infinite}
@keyframes qc-spin{to{transform:rotate(360deg)}}
.qc-linked-block{margin-top:26px}
.qc-linked-divider{display:flex;align-items:center;gap:14px;color:#7f716d;font-size:10px;font-weight:800;letter-spacing:.08em}
.qc-linked-divider:before,.qc-linked-divider:after{content:"";height:1px;flex:1;background:#dbe4f2}
.qc-sso-note{margin-top:16px;display:flex;align-items:flex-start;gap:12px;padding:13px 14px;border:1px solid #d5e1f4;border-radius:11px;background:#f4f8ff;color:#24364b}
.qc-sso-icon{width:34px;height:34px;border-radius:9px;background:#e5f0ff;display:grid;place-items:center;color:#0b6ba8;font-size:18px;flex:0 0 34px}
.qc-sso-note strong{display:block;font-size:12px;margin-bottom:3px}
.qc-sso-note small{display:block;color:#6f7d90;font-size:10.5px;line-height:1.45}
.qc-form-footer{margin-top:26px;padding-top:18px;border-top:1px solid #e3eaf5;color:#756a67;font-size:11px}
.qc-login-footer{flex:0 0 auto;padding:11px 24px;text-align:center;border-top:1px solid #e6ebf4;background:rgba(255,255,255,.72);color:#7c858f;font-size:10px}
@media(max-width:1050px){
  .qc-auth-card{min-height:640px}
  .qc-auth-hero{padding:42px 38px}
  .qc-auth-form{padding:46px 44px 34px}
  .qc-auth-hero h1{font-size:34px}
  .qc-logo-box{width:116px;height:116px}
}
@media(max-width:820px){
  .qc-login-topbar{padding:0 16px}.qc-top-desc,.qc-top-dot,.qc-help{display:none}
  .qc-login-main{padding:18px 14px}.qc-auth-card{grid-template-columns:1fr;min-height:0;max-width:620px}
  .qc-auth-hero{padding:28px 30px;min-height:235px}.qc-logo-box{width:78px;height:78px;border-radius:17px;margin-bottom:18px}
  .qc-auth-hero h1{font-size:28px;margin-top:14px}.qc-auth-hero h2{font-size:16px}.qc-hero-rule{margin:16px 0}
  .qc-auth-hero p{font-size:12px;line-height:1.55}.qc-hero-bottom{display:none}.qc-auth-form{padding:34px 30px}
}
@media(max-width:520px){
  .qc-login-topbar{height:50px;flex-basis:50px}.qc-login-brandline strong{font-size:13px}.qc-status-pill{font-size:9px;padding:5px 8px}
  .qc-login-main{padding:10px}.qc-auth-card{border-radius:14px}.qc-auth-hero{display:none}
  .qc-auth-form{padding:30px 20px 24px}.qc-form-head h2{font-size:30px}.qc-form-head p{font-size:12px;margin-bottom:24px}
  .qc-field input{height:52px}.qc-login-submit{height:54px}.qc-login-footer{display:none}
}

/* ===== VIEWPORT FIT V2 ===== */
html,body{height:100%;overflow:hidden}
body.qc-login-page{height:100dvh;min-height:0;overflow:hidden}
.qc-login-topbar{height:50px;flex:0 0 50px;padding:0 24px}
.qc-login-main{height:calc(100dvh - 80px);min-height:0;flex:1 1 auto;padding:16px 20px;overflow:hidden}
.qc-auth-card{height:min(650px,calc(100dvh - 112px));min-height:0;max-height:650px}
.qc-auth-hero{padding:36px 42px}
.qc-logo-box{width:104px;height:104px;border-radius:20px;margin-bottom:20px}
.qc-auth-hero h1{font-size:34px;margin:16px 0 5px}
.qc-auth-hero h2{font-size:17px}
.qc-hero-rule{margin:18px 0;width:52px}
.qc-auth-hero p{font-size:13px;line-height:1.55}
.qc-hero-bottom{padding-top:18px}
.qc-hero-quote{margin-top:9px!important}
.qc-hero-meta{margin-top:10px}
.qc-auth-form{padding:34px 54px 24px;min-height:0;overflow:hidden}
.qc-form-head h2{margin:10px 0 6px;font-size:32px}
.qc-form-head p{margin-bottom:20px;font-size:12.5px;line-height:1.45}
.qc-login-form{gap:10px}
.qc-field input{height:48px}
.qc-login-submit{height:50px;margin-top:3px}
.qc-linked-block{margin-top:16px}
.qc-sso-note{margin-top:10px;padding:10px 12px}
.qc-form-footer{margin-top:14px;padding-top:12px}
.qc-login-footer{height:30px;padding:7px 20px;overflow:hidden}

@media(max-width:820px){
  html,body{height:100%;overflow:hidden}
  body.qc-login-page{height:100dvh;overflow:hidden}
  .qc-login-topbar{height:48px;flex-basis:48px;padding:0 14px}
  .qc-login-main{height:calc(100dvh - 48px);padding:10px;overflow:hidden}
  .qc-auth-card{width:min(620px,100%);height:calc(100dvh - 68px);max-height:none;min-height:0;grid-template-columns:1fr}
  .qc-auth-hero{display:none}
  .qc-auth-form{height:100%;padding:24px 28px 18px;justify-content:center;overflow:hidden}
  .qc-form-head h2{font-size:28px;margin:8px 0 5px}
  .qc-form-head p{font-size:11.5px;line-height:1.4;margin-bottom:16px}
  .qc-field input{height:46px}
  .qc-login-submit{height:48px}
  .qc-linked-block{margin-top:14px}
  .qc-sso-note{padding:9px 10px}
  .qc-sso-note small{font-size:9.5px}
  .qc-form-footer{margin-top:12px;padding-top:10px}
  .qc-login-footer{display:none}
}
@media(max-width:520px){
  .qc-login-brandline strong{font-size:12px}
  .qc-status-pill{font-size:8.5px;padding:5px 7px}
  .qc-auth-card{border-radius:12px}
  .qc-auth-form{padding:20px 18px 16px}
  .qc-form-head h2{font-size:26px}
  .qc-password-help{display:none}
  .qc-linked-divider span{font-size:9px}
  .qc-sso-note strong{font-size:11px}
}

/* Logo đăng nhập: to hơn, viền trắng mỏng */
.qc-logo-box{width:132px!important;height:132px!important;padding:4px!important;border-radius:22px!important;box-shadow:0 10px 24px rgba(34,0,0,.26),0 0 0 2px rgba(255,255,255,.18)!important}
.qc-logo-box img{border-radius:18px}
@media (max-width:900px){.qc-logo-box{width:96px!important;height:96px!important;padding:3px!important;border-radius:18px!important}.qc-logo-box img{border-radius:15px}}

.qc-company-name{color:#a71919;font-size:17px;font-weight:800;letter-spacing:.01em;white-space:nowrap}
@media (max-width:900px){.qc-company-name{font-size:12px;white-space:normal;line-height:1.25}}
