/* Mentor VietSCI - tone màu thương hiệu VietSCI (indigo #1A00AE + cam #FF6600), đồng bộ phong cách biblio.vietscies.com */
:root {
  --indigo: #1A00AE; --indigo-2: #3B22D6; --violet: #7C3AED; --navy: #100E33;
  --orange: #FF6600; --orange-2: #FF8A3D; --coral: #E5484D; --green: #12A150; --teal: #0D9488; --amber: #F5A524;
  --bg: #F8F9FD; --card: #fff; --text: #1D2035; --muted: #6C728C; --line: #E7E8F2; --soft: #F1F0FD;
  --radius: 16px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(27,23,99,.05), 0 1px 3px rgba(27,23,99,.05);
  --shadow: 0 12px 32px -14px rgba(27,23,99,.16), 0 4px 10px -6px rgba(27,23,99,.06);
  --shadow-lg: 0 30px 60px -24px rgba(27,23,99,.25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap: 1200px; --ease: cubic-bezier(.2,.7,.2,1);
  --grad-brand: linear-gradient(135deg, #1A00AE 0%, #3B22D6 45%, #7C3AED 100%);
  --grad-warm: linear-gradient(135deg, #FF6600 0%, #FF8A3D 100%);
  --grad-tri: linear-gradient(90deg, #1A00AE, #7C3AED 50%, #FF6600);
  --mesh: radial-gradient(700px 420px at 92% -8%, rgba(124,58,237,.16), transparent 62%), radial-gradient(620px 380px at 70% 110%, rgba(13,148,136,.10), transparent 60%), radial-gradient(560px 360px at -6% 20%, rgba(59,34,214,.12), transparent 60%), radial-gradient(520px 320px at 30% 105%, rgba(255,102,0,.10), transparent 60%);
  --dots: radial-gradient(rgba(59,34,214,.10) 1px, transparent 1.2px);
}
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased }
a { color: var(--indigo-2); text-decoration: none } a:hover { color: var(--orange) }
img { max-width: 100%; display: block }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--navy) }
h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800 }
h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800 }
h3 { font-size: 18px; font-weight: 700 }
p { margin: 0 0 1em }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px }
.muted { color: var(--muted) } .small { font-size: 13px } .center { text-align: center }
.grad-text { background: var(--grad-tri); -webkit-background-clip: text; background-clip: text; color: transparent }
.orange { color: var(--orange) }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; font: 600 14.5px/1.2 var(--font); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s; white-space: nowrap; text-decoration: none }
.btn:hover { transform: translateY(-1px) }
.btn:active { transform: none }
.btn .ic { width: 18px; height: 18px; transition: transform .25s var(--ease) }
.btn:hover .ic { transform: translateX(2px) }
.btn-primary { background: var(--grad-warm); color: #fff; box-shadow: 0 10px 22px -10px rgba(255,102,0,.7) }
.btn-primary:hover { color: #fff; box-shadow: 0 14px 28px -10px rgba(255,102,0,.8) }
.btn-indigo { background: var(--grad-brand); color: #fff; box-shadow: 0 10px 22px -10px rgba(26,0,174,.6) }
.btn-indigo:hover { color: #fff }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-sm) }
.btn-ghost:hover { color: var(--indigo); border-color: #CFC8FF }
.btn-danger { background: #fff; color: var(--coral); border-color: #F8C9CB }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px }
.btn-block { width: 100% }
.btn[disabled] { opacity: .55; pointer-events: none }

/* ---------- Header ---------- */
.topbar { background: var(--navy); color: #C9C6F0; font-size: 13px }
.topbar .wrap { display: flex; gap: 22px; align-items: center; min-height: 36px; flex-wrap: wrap }
.topbar a { color: #E5E3FF; display: inline-flex; gap: 6px; align-items: center }
.topbar .ic { width: 15px; height: 15px; color: var(--orange-2) }
.topbar .sp { margin-left: auto }
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(231,232,242,.8) }
.hdr .wrap { display: flex; align-items: center; gap: 22px; min-height: 70px }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; color: var(--navy); font-weight: 800; font-size: 19px; letter-spacing: -.02em }
.brand img { width: 40px; height: 40px; object-fit: contain; transition: transform .5s var(--ease) }
.brand:hover img { transform: rotate(-8deg) scale(1.06) }
.brand small { display: block; font-size: 10.5px; letter-spacing: .18em; color: var(--orange); font-weight: 700; margin-top: 2px }
.brand b { color: var(--orange) }
.nav { display: flex; gap: 4px; margin-left: auto }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14.5px }
.nav a:hover, .nav a.on { background: var(--soft); color: var(--indigo) }
.nav a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap }
.nav .ni { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, rgba(26,0,174,.08), rgba(255,102,0,.10)); color: var(--indigo-2); transition: transform .35s var(--ease), background .25s, color .25s }
.nav .ni .ic { width: 15px; height: 15px }
.nav a:nth-child(even) .ni { color: var(--orange) }
.nav a:hover .ni { animation: wiggle .6s var(--ease) }
.nav a.on .ni { background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; box-shadow: 0 4px 12px rgba(26,0,174,.28) }
@media (min-width: 1101px) and (max-width: 1300px) { .nav { gap: 0 } .nav a { padding: 7px 7px; font-size: 14px; gap: 6px } .nav .ni { width: 24px; height: 24px } }
@media (prefers-reduced-motion: reduce) { .nav a:hover .ni { animation: none } }
.hdr .acts { display: flex; gap: 8px; align-items: center }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy) }
@media (max-width: 1100px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 70px; flex-direction: column; background: #fff; padding: 12px 20px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow) }
  .nav.open { display: flex }
  .burger { display: block }
  .hdr .acts { margin-left: auto }
  .hdr .acts .btn-ghost { display: none }
}
@media (max-width: 960px) { .topbar .hide-m { display: none } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--mesh), #fff; padding: 72px 0 84px }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--dots); background-size: 22px 22px; mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%); pointer-events: none }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff; border: 1px solid #E4E0FF; color: var(--indigo); font-weight: 600; font-size: 13px; box-shadow: var(--shadow-sm) }
.pill .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--grad-warm); display: grid; place-items: center; color: #fff }
.pill .dot .ic { width: 13px; height: 13px }
.hero h1 { margin: 18px 0 16px }
.hero .lead { font-size: 17.5px; color: #4A4F6A; max-width: 580px }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 24px }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: #3A3F5C }
.chip .ic { width: 15px; height: 15px; color: var(--indigo-2) }
.hero-art { position: relative; min-height: 420px }
.hero-card { position: absolute; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid #EEEDFB; padding: 18px }
.hero-card.main { inset: 20px 30px 40px 10px; padding: 24px; display: flex; flex-direction: column; gap: 14px }
.hero-card.f1 { right: -6px; top: 0; animation: floaty 6s ease-in-out infinite; display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 13.5px }
.hero-card.f2 { left: -14px; bottom: 6px; animation: floaty 7s ease-in-out infinite .8s; display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 13.5px }
.hero-card .badge-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--grad-brand) }
.hero-card .badge-ic.warm { background: var(--grad-warm) }
.mentor-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--bg); animation: fadeUp .7s var(--ease) both }
.mentor-row:nth-child(3) { animation-delay: .15s } .mentor-row:nth-child(4) { animation-delay: .3s }
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad-brand); flex: none; overflow: hidden }
.av img { width: 100%; height: 100%; object-fit: cover }
.av.lg { width: 84px; height: 84px; font-size: 28px }
.av.sm { width: 32px; height: 32px; font-size: 12.5px }
.progress { height: 8px; background: #ECEBFA; border-radius: 99px; overflow: hidden }
.progress span { display: block; height: 100%; background: var(--grad-tri); border-radius: 99px; animation: grow 1.6s var(--ease) both }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr } .hero-art { min-height: 380px } }

/* ---------- Section ---------- */
.sec { padding: 84px 0 }
.sec.alt { background: #fff }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 46px }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--orange); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px }
.eyebrow .ic { width: 16px; height: 16px }
.grid { display: grid; gap: 22px }
.g2 { grid-template-columns: repeat(2, 1fr) } .g3 { grid-template-columns: repeat(3, 1fr) } .g4 { grid-template-columns: repeat(4, 1fr) }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr } .sec { padding: 60px 0 } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s }
.card.lift:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #D9D4FF }
.card h3 { margin: 14px 0 8px }
.card p { color: var(--muted); margin: 0 }
.ibox { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--grad-brand); box-shadow: 0 12px 22px -12px rgba(26,0,174,.7); position: relative }
.ibox .ic { width: 26px; height: 26px }
.ibox.warm { background: var(--grad-warm); box-shadow: 0 12px 22px -12px rgba(255,102,0,.7) }
.ibox.teal { background: linear-gradient(135deg, #0D9488, #14B8A6); box-shadow: 0 12px 22px -12px rgba(13,148,136,.7) }
.ibox.violet { background: linear-gradient(135deg, #7C3AED, #A78BFA) }
.ibox.soft { background: var(--soft); color: var(--indigo); box-shadow: none }
.ibox.sm { width: 40px; height: 40px; border-radius: 12px } .ibox.sm .ic { width: 20px; height: 20px }

/* Icon động */
.card.lift:hover .ibox { animation: wiggle .7s var(--ease) }
.anim-float { animation: floaty 5s ease-in-out infinite }
.anim-pulse::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid currentColor; opacity: 0; animation: ring 2.4s ease-out infinite; color: rgba(255,102,0,.6) }
.anim-spin .ic, .spin { animation: spin 1.1s linear infinite }
.draw .ic path, .draw .ic circle, .draw .ic rect { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 1.6s var(--ease) forwards }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease) }
.reveal.in { opacity: 1; transform: none }
@keyframes floaty { 50% { transform: translateY(-10px) } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@keyframes wiggle { 0%, 100% { transform: rotate(0) } 25% { transform: rotate(-9deg) scale(1.06) } 60% { transform: rotate(7deg) scale(1.06) } }
@keyframes ring { 0% { opacity: .9; transform: scale(.9) } 100% { opacity: 0; transform: scale(1.35) } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes draw { to { stroke-dashoffset: 0 } }
@keyframes grow { from { width: 0 } }
@keyframes shine { to { background-position: 200% 0 } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } .reveal { opacity: 1; transform: none } }

/* Số liệu */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: -40px; position: relative; z-index: 2 }
.stat { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid #EEEDFB; display: flex; gap: 14px; align-items: center }
.stat b { display: block; font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -.03em; line-height: 1.1 }
.stat span { color: var(--muted); font-size: 13.5px }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr) } }

/* Quy trình */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative }
.steps::before { content: ""; position: absolute; top: 34px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, #CFC8FF 0 8px, transparent 8px 16px); animation: dash 30s linear infinite }
.step { position: relative; text-align: center; padding: 0 8px }
.step .ibox { margin: 0 auto 14px; width: 68px; height: 68px; border-radius: 50%; border: 5px solid #fff }
.step .ibox::before { counter-increment: s; content: counter(s); position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff }
.step p { color: var(--muted); font-size: 14px }
@keyframes dash { to { background-position: 400px 0 } }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr) } .steps::before { display: none } }

/* Mentor */
.mcard { text-align: center; padding: 28px 22px }
.mcard .av { margin: 0 auto 12px; box-shadow: 0 0 0 5px #fff, 0 0 0 7px #E4E0FF }
.mcard .deg { color: var(--orange); font-weight: 700; font-size: 13px }
.tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 12px }
.tag { font-size: 12px; padding: 4px 10px; background: var(--soft); color: var(--indigo); border-radius: 99px; font-weight: 600 }

/* Gói */
.plan { position: relative; display: flex; flex-direction: column; gap: 10px }
.plan.hot { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad-tri) border-box; box-shadow: var(--shadow) }
.plan .ribbon { position: absolute; top: -12px; right: 18px; background: var(--grad-warm); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 99px }
.plan ul { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 8px }
.plan li { display: flex; gap: 8px; color: #3A3F5C; font-size: 14.5px }
.plan li .ic { width: 18px; height: 18px; color: var(--green); margin-top: 2px }
.plan .price { font-size: 26px; font-weight: 800; color: var(--navy) }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--navy) }
.faq summary::-webkit-details-marker { display: none }
.faq summary .ic { transition: transform .3s var(--ease); color: var(--indigo-2) }
.faq details[open] summary .ic { transform: rotate(90deg) }
.faq details p { margin: 10px 0 0; color: var(--muted) }

/* CTA */
.cta { background: var(--grad-brand); color: #fff; border-radius: 24px; padding: 48px; display: flex; gap: 30px; align-items: center; justify-content: space-between; position: relative; overflow: hidden }
.cta::after { content: ""; position: absolute; width: 360px; height: 360px; right: -80px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(255,102,0,.55), transparent 65%); animation: floaty 8s ease-in-out infinite }
.cta h2 { color: #fff } .cta p { color: #DCD8FF; margin: 0 }
.cta > * { position: relative; z-index: 1 }
@media (max-width: 760px) { .cta { flex-direction: column; align-items: flex-start; padding: 32px } }

/* Footer */
.ftr { background: var(--navy); color: #B9B6E0; padding: 60px 0 24px; margin-top: 0 }
.ftr .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px }
.ftr h4 { color: #fff; font-size: 15px; margin-bottom: 14px }
.ftr a { color: #DCD9FF; display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px }
.ftr a:hover { color: var(--orange-2) }
.ftr .ic { width: 16px; height: 16px; color: var(--orange-2) }
.ftr .bot { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px }
.ftr .logo-w { background: #fff; border-radius: 14px; padding: 10px 14px; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--navy); font-weight: 800 }
.ftr .logo-w img { width: 34px; height: 34px; object-fit: contain }
@media (max-width: 860px) { .ftr .cols { grid-template-columns: 1fr 1fr } }

/* ---------- Đăng nhập ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff }
.auth .side { background: var(--grad-brand); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden }
.auth .side::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.2px); background-size: 22px 22px }
.auth .side::after { content: ""; position: absolute; width: 460px; height: 460px; right: -160px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255,102,0,.55), transparent 65%); animation: floaty 9s ease-in-out infinite }
.auth .side > * { position: relative; z-index: 1 }
.auth .side h2 { color: #fff; font-size: 34px }
.auth .side .feat { display: flex; gap: 12px; align-items: center; margin: 14px 0; color: #E6E3FF }
.auth .side .feat .ibox { background: rgba(255,255,255,.14); box-shadow: none; backdrop-filter: blur(6px) }
.auth .side .logo-w { background: #fff; border-radius: 16px; padding: 10px 16px; display: inline-flex; gap: 10px; align-items: center; color: var(--navy); font-weight: 800; font-size: 18px }
.auth .side .logo-w img { width: 38px; height: 38px; object-fit: contain }
.auth .main { display: grid; place-items: center; padding: 40px 24px; background: var(--mesh), #fff }
.auth form { width: 100%; max-width: 420px }
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 22px }
.roles label { cursor: pointer }
.roles input { position: absolute; opacity: 0 }
.roles span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: #fff; transition: all .2s var(--ease); text-align: center }
.roles span .ic { width: 22px; height: 22px }
.roles input:checked + span { border-color: var(--indigo-2); color: var(--indigo); background: var(--soft); box-shadow: 0 8px 18px -12px rgba(26,0,174,.6) }
.roles input:checked + span .ic { animation: wiggle .6s var(--ease) }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr } .auth .side { display: none } }

/* ---------- Form ---------- */
.field { margin-bottom: 14px }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: #343A55 }
.inp { position: relative }
.inp .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9BA0B8; pointer-events: none }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: 14.5px var(--font); color: var(--text); background: #fff; transition: border-color .2s, box-shadow .2s; outline: none }
.inp input { padding-left: 40px }
input:focus, select:focus, textarea:focus { border-color: #9C8CFF; box-shadow: 0 0 0 4px rgba(59,34,214,.1) }
textarea { min-height: 96px; resize: vertical }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px }
.alert .ic { width: 18px; height: 18px; margin-top: 1px }
.alert.err { background: #FFF0F0; color: #B4232A; border: 1px solid #FBD0D2 }
.alert.ok { background: #EEFBF3; color: #0E7A3D; border: 1px solid #C2EED3 }
.alert.info { background: var(--soft); color: var(--indigo); border: 1px solid #E0DBFF }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0 }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line) }

/* ---------- Cổng quản trị / cổng người dùng ---------- */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh }
.sb { background: var(--navy); color: #C9C6F0; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column }
.sb .brand { color: #fff; padding: 6px 8px 18px; font-size: 17px }
.sb .brand img { background: #fff; border-radius: 10px; padding: 4px; width: 40px; height: 40px }
.sb .who { display: flex; gap: 10px; align-items: center; padding: 12px; background: rgba(255,255,255,.06); border-radius: 14px; margin-bottom: 16px }
.sb .who b { color: #fff; display: block; font-size: 14px; line-height: 1.3 }
.sb .who span { font-size: 12px; color: var(--orange-2) }
.sb .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #7E7AB8; margin: 14px 10px 6px; font-weight: 700 }
.sb a { display: flex; gap: 11px; align-items: center; padding: 9px 12px; border-radius: 11px; color: #D6D3F7; font-weight: 500; font-size: 14.5px; transition: background .2s, color .2s }
.sb a .ic { width: 19px; height: 19px; color: #9A95D9; transition: transform .3s var(--ease), color .2s }
.sb a:hover { background: rgba(255,255,255,.07); color: #fff }
.sb a:hover .ic { transform: scale(1.15) rotate(-6deg); color: var(--orange-2) }
.sb a.on { background: linear-gradient(90deg, rgba(255,102,0,.22), rgba(255,102,0,.04)); color: #fff; box-shadow: inset 3px 0 0 var(--orange) }
.sb a.on .ic { color: var(--orange-2) }
.sb .cnt { margin-left: auto; background: rgba(255,255,255,.1); color: #fff; font-size: 11.5px; padding: 1px 8px; border-radius: 99px }
.sb .foot { margin-top: auto; padding-top: 16px }
.main-area { min-width: 0; overflow-x: hidden; background: var(--mesh), var(--bg); background-attachment: fixed }
.ptop { display: flex; align-items: center; gap: 14px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.75); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20 }
.ptop h1 { font-size: 21px; margin: 0; display: flex; gap: 10px; align-items: center }
.ptop h1 .ibox { width: 36px; height: 36px; border-radius: 11px } .ptop h1 .ibox .ic { width: 19px; height: 19px }
.ptop .sp { margin-left: auto; display: flex; gap: 8px; align-items: center }
.pbody { padding: 26px 28px 60px }
.sb-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--navy); padding: 4px }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr }
  .sb { position: fixed; left: 0; top: 0; z-index: 90; width: 270px; transform: translateX(-100%); transition: transform .3s var(--ease) }
  .sb.open { transform: none; box-shadow: var(--shadow-lg) }
  .sb-toggle { display: block }
  .ptop, .pbody { padding-left: 16px; padding-right: 16px }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px }
.kpi { background: #fff; border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: center; transition: transform .3s var(--ease), box-shadow .3s; animation: fadeUp .6s var(--ease) both }
.kpi:nth-child(2) { animation-delay: .06s } .kpi:nth-child(3) { animation-delay: .12s } .kpi:nth-child(4) { animation-delay: .18s } .kpi:nth-child(5) { animation-delay: .24s }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow) }
.kpi:hover .ibox { animation: wiggle .7s var(--ease) }
.kpi > div { min-width: 0 }
.kpi b { font-size: clamp(19px, 1.7vw, 25px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; color: var(--navy); line-height: 1.1; display: block; letter-spacing: -.02em }
.kpi span { font-size: 13px; color: var(--muted) }
.panel { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 22px; overflow: hidden; animation: fadeUp .5s var(--ease) both }
.panel > .ph { display: flex; gap: 10px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line) }
.panel > .ph h3 { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: center }
.panel > .ph h3 .ic { color: var(--orange) }
.panel > .ph .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.panel > .pb { padding: 20px }
.panel > .pb.flush { padding: 0 }
.tbl-wrap { overflow-x: auto }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 11px 16px; background: #FAFAFE; border-bottom: 1px solid var(--line); white-space: nowrap }
.tbl td { padding: 12px 16px; border-bottom: 1px solid #F0F0F7; vertical-align: middle }
.tbl tr:last-child td { border-bottom: 0 }
.tbl tbody tr { transition: background .15s }
.tbl tbody tr:hover { background: #FBFAFF }
.person { display: flex; gap: 10px; align-items: center }
.person b { display: block; font-weight: 600; color: var(--navy) }
.person > div > span { display: block; font-size: 12.5px; color: var(--muted) }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #F0F0F7; color: #4A4F6A }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.badge.ok { background: #E8F8EE; color: #0E7A3D } .badge.warn { background: #FFF4E5; color: #B45309 } .badge.err { background: #FFEDEE; color: #B4232A }
.badge.info { background: var(--soft); color: var(--indigo) } .badge.vio { background: #F3EDFF; color: #6D28D9 }
.empty { text-align: center; padding: 46px 20px; color: var(--muted) }
.empty .ibox { margin: 0 auto 12px }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.toolbar input[type=search] { width: 260px; padding: 8px 12px; border-radius: 10px }
.toolbar select { width: auto; padding: 8px 12px; border-radius: 10px }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto }
.tabs a { padding: 12px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center }
.tabs a.on { color: var(--indigo); border-color: var(--orange) }
.tabs a .ic { width: 17px; height: 17px }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px }
.dl dt { color: var(--muted) } .dl dd { margin: 0; font-weight: 500 }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px }
.split > * { min-width: 0 }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr } }
.timeline { list-style: none; margin: 0; padding: 0 }
.timeline li { position: relative; padding: 0 0 18px 30px }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: #ECEBFA }
.timeline li:last-child::before { display: none }
.timeline .dot { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--indigo-2) }
.timeline li.done .dot { border-color: var(--green); background: var(--green) }
.timeline b { display: block; color: var(--navy) }
.contract-doc { border: 1px solid var(--line); border-radius: 12px; padding: 28px; max-height: 70vh; overflow: auto; background: #fff; font-family: 'Times New Roman', Tinos, serif; font-size: 15px; line-height: 1.55 }
.contract-doc img { max-width: 220px }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--green); box-shadow: 0 0 0 0 rgba(18,161,80,.6); animation: pulse 2s infinite }
.sync-dot.err { background: var(--coral); animation: none }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(18,161,80,0) } 100% { box-shadow: 0 0 0 0 rgba(18,161,80,0) } }
.copy-box { display: flex; gap: 8px } .copy-box input { font-family: ui-monospace, Consolas, monospace; font-size: 13px }
.welcome { background: var(--grad-brand); color: #fff; border-radius: var(--radius); padding: 26px; display: flex; gap: 20px; align-items: center; margin-bottom: 22px; position: relative; overflow: hidden }
.welcome::after { content: ""; position: absolute; width: 280px; height: 280px; right: -60px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(255,102,0,.5), transparent 65%); animation: floaty 7s ease-in-out infinite }
.welcome h2 { color: #fff; font-size: 22px; margin: 0 0 4px } .welcome p { color: #DCD8FF; margin: 0 }
.welcome > * { position: relative; z-index: 1 }
.welcome .ibox { background: rgba(255,255,255,.15); box-shadow: none }
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(560px, 94vw); box-shadow: var(--shadow-lg) }
dialog.modal::backdrop { background: rgba(16,14,51,.45); backdrop-filter: blur(3px) }
dialog.modal .mh { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px }
dialog.modal .mh h3 { margin: 0 }
dialog.modal .mb { padding: 20px 22px }
dialog.modal .mf { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #FAFAFE }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: fadeUp .3s var(--ease) }
.toast .ic { color: var(--orange-2) }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px }
.bar-chart .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 12px; color: var(--muted) }
.bar-chart .b i { display: block; width: 100%; max-width: 46px; border-radius: 8px 8px 4px 4px; background: var(--grad-brand); animation: rise 1.1s var(--ease) both; transform-origin: bottom }
.bar-chart .b:nth-child(even) i { background: var(--grad-warm) }
@keyframes rise { from { transform: scaleY(0) } }
.err-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px }
.welcome > div { flex: 1 1 240px; min-width: 0 }
@media (max-width: 640px) {
  .welcome { flex-wrap: wrap; padding: 20px }
  .welcome .btn { margin-left: 0 !important }
  .brand { font-size: 16px } .brand small { display: none } .brand img { width: 34px; height: 34px }
  .hdr .acts .btn span { display: none } .hdr .acts .btn { padding: 9px 11px }
  .topbar .wrap > a:first-child { display: none }
  .cta { padding: 26px } .hero { padding: 44px 0 70px }
  .ptop h1 { font-size: 17px } .pbody { padding-top: 18px }
  .dl { grid-template-columns: 1fr; gap: 2px 0 } .dl dd { margin-bottom: 8px }
}
