/* ===== Sửa lỗi cuộn trang: bundle React đặt html,body{height:100%} + main.css body{overflow:hidden}
   (trên nlu.edu.vn trang cuộn trong #root; bản PHP không có #root) ===== */
html, body { height: auto !important; min-height: 100%; }
body { overflow-x: hidden !important; overflow-y: visible !important; }

/* ===== Box tiện ích trang chủ ===== */
.nlu-widgets { padding: 40px 0; background: linear-gradient(180deg, #f3f8f2 0%, #fff 100%); }

/* --- Thời tiết: nền + icon đổi theo tình huống (data-cond) --- */
.wx { position: relative; overflow: hidden; height: 100%; min-height: 260px; border-radius: 18px; padding: 20px 22px;
      color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.12); transition: background .8s;
      background: linear-gradient(135deg, #5b8def 0%, #2f5fd0 100%); }
.wx[data-cond="sunny"]      { background: linear-gradient(135deg, #f9b233 0%, #f57f17 100%); }
.wx[data-cond="hot"]        { background: linear-gradient(135deg, #ff7043 0%, #d84315 100%); }
.wx[data-cond="cloudy"]     { background: linear-gradient(135deg, #78909c 0%, #455a64 100%); }
.wx[data-cond="after-rain"] { background: linear-gradient(135deg, #4fa3a5 0%, #2e6f7e 100%); }
.wx[data-cond="rain"]       { background: linear-gradient(135deg, #4b6c8f 0%, #263a52 100%); }
.wx[data-cond="storm"]      { background: linear-gradient(135deg, #3a3f47 0%, #15181d 100%); }
.wx[data-cond="night"]      { background: linear-gradient(135deg, #1e3c72 0%, #0b1a33 100%); }
.wx[data-cond="night-rain"] { background: linear-gradient(135deg, #283c56 0%, #0e1724 100%); }
.wx[data-cond="dusk"]       { background: linear-gradient(135deg, #f0855b 0%, #7b3f8c 100%); }
.wx[data-cond="dawn"]       { background: linear-gradient(135deg, #ffb88c 0%, #de6262 100%); }
.wx-empty { background: #e9eef3; color: #445; display: flex; align-items: center; justify-content: center; }
.wx-head { display: flex; justify-content: space-between; font-size: 13px; opacity: .9; position: relative; z-index: 1; }
.wx-main { display: flex; align-items: center; gap: 18px; margin: 10px 0 6px; position: relative; z-index: 1; }
.wx-icons { width: 104px; height: 104px; flex: none; filter: drop-shadow(0 6px 12px rgba(0,0,0,.18)); }
.wx-ic { display: none; width: 100%; height: 100%; overflow: visible; }
.wx[data-cond="sunny"] .wx-ic-sunny, .wx[data-cond="hot"] .wx-ic-hot, .wx[data-cond="cloudy"] .wx-ic-cloudy,
.wx[data-cond="after-rain"] .wx-ic-after-rain, .wx[data-cond="rain"] .wx-ic-rain, .wx[data-cond="storm"] .wx-ic-storm,
.wx[data-cond="night"] .wx-ic-night, .wx[data-cond="night-rain"] .wx-ic-night-rain, .wx[data-cond="dusk"] .wx-ic-dusk,
.wx[data-cond="dawn"] .wx-ic-dawn { display: block; }
.wxf[data-cond="sunny"] .wx-ic-sunny, .wxf[data-cond="hot"] .wx-ic-hot, .wxf[data-cond="cloudy"] .wx-ic-cloudy, .wxf[data-cond="after-rain"] .wx-ic-after-rain, .wxf[data-cond="rain"] .wx-ic-rain, .wxf[data-cond="storm"] .wx-ic-storm, .wxf[data-cond="night"] .wx-ic-night, .wxf[data-cond="night-rain"] .wx-ic-night-rain, .wxf[data-cond="dusk"] .wx-ic-dusk, .wxf[data-cond="dawn"] .wx-ic-dawn { display: block; }
.wx-temp { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.wx-temp sup { font-size: 22px; top: -1.4em; margin-left: 2px; }
.wx-label { font-size: 20px; font-weight: 600; margin-top: 4px; }
.wx-feels { font-size: 13px; opacity: .85; }
.wx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; z-index: 1; }
.wx-stats > div { background: rgba(255,255,255,.16); border-radius: 12px; padding: 8px 6px; text-align: center; font-size: 13px; backdrop-filter: blur(2px); }
.wx-stats i { display: block; opacity: .9; margin-bottom: 2px; }
.wx-stats b { font-size: 17px; }
.wx-stats small { display: block; font-size: 11px; opacity: .85; }
.wx-tip { margin: 12px 0 0; font-size: 14px; position: relative; z-index: 1; }
@media (max-width: 420px) { .wx-stats { grid-template-columns: repeat(2, 1fr); } .wx-temp { font-size: 46px; } }

/* hiệu ứng nền & icon */
.wx-sun { transform-origin: 32px 32px; animation: wxSpin 24s linear infinite; }
.wx-hotglow { transform-origin: 32px 32px; animation: wxPulse 2.4s ease-in-out infinite; }
.wx-cloud { animation: wxFloat 6s ease-in-out infinite; }
.wx-drops line { animation: wxDrop 1s linear infinite; }
.wx-drops line:nth-child(2) { animation-delay: .33s; } .wx-drops line:nth-child(3) { animation-delay: .66s; }
.wx-bolt { animation: wxFlash 3s steps(1) infinite; }
.wx-stars circle { animation: wxTwinkle 2.5s ease-in-out infinite; } .wx-stars circle:nth-child(2) { animation-delay: .8s; } .wx-stars circle:nth-child(3) { animation-delay: 1.6s; }
.wx-moon { animation: wxFloat 8s ease-in-out infinite; }
.wx-fx { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.wx[data-cond="rain"] .wx-fx, .wx[data-cond="storm"] .wx-fx, .wx[data-cond="night-rain"] .wx-fx {
  background-image: repeating-linear-gradient(105deg, transparent 0 18px, rgba(255,255,255,.18) 18px 19px);
  background-size: 200% 200%; animation: wxRain .6s linear infinite; }
.wx[data-cond="sunny"] .wx-fx, .wx[data-cond="hot"] .wx-fx { background: radial-gradient(circle at 15% 25%, rgba(255,255,255,.45), transparent 45%); }
.wx[data-cond="night"] .wx-fx { background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 85% 60%, #fff, transparent), radial-gradient(1px 1px at 40% 75%, #fff, transparent); }
@keyframes wxSpin { to { transform: rotate(360deg); } }
@keyframes wxPulse { 50% { transform: scale(1.15); opacity: .6; } }
@keyframes wxFloat { 50% { transform: translateX(3px); } }
@keyframes wxDrop { from { transform: translateY(-4px); opacity: 0; } 40% { opacity: 1; } to { transform: translateY(6px); opacity: 0; } }
@keyframes wxFlash { 0%, 92% { opacity: 1; } 93%, 96% { opacity: .1; } }
@keyframes wxTwinkle { 50% { opacity: .2; } }
@keyframes wxRain { from { background-position: 0 0; } to { background-position: -20px 40px; } }
@media (prefers-reduced-motion: reduce) { .wx *, .wx-fx { animation: none !important; } }

/* --- Box tra cứu --- */
.nlu-card-lookup { background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.08); border-top: 4px solid var(--primary, #458e42); display: flex; flex-direction: column; }
.lk-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.lk-head > i { font-size: 34px; color: var(--primary, #458e42); background: #eaf4e9; width: 62px; height: 62px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex: none; }
.lk-head h3 { font-size: 20px; margin: 0; color: #1b5e20; font-weight: 700; }
.lk-head p { margin: 2px 0 0; font-size: 13px; color: #666; }
.lk-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
@media (max-width: 768px) { .lk-form { grid-template-columns: 1fr; } }
.lk-steps { padding-left: 1.2rem; margin: 0 0 12px; color: #444; }
.lk-sum { display: flex; gap: 10px; margin-bottom: 12px; }
.lk-sum > div { flex: 1; text-align: center; background: #f3f8f2; border-radius: 12px; padding: 10px 6px; }
.lk-sum b { display: block; font-size: 24px; color: #2e7d32; }
.lk-sum small { color: #666; }
.lk-note { font-size: 12px; color: #777; margin: 10px 0 0; }

/* --- Chat AI NLU: tự định vị & hiển thị, không phụ thuộc CSS gốc (gốc chỉ áp dụng khi nằm trong footer) --- */
.nlu-chat { position: fixed; right: 20px; bottom: 108px; z-index: 10000; }
.nlu-chat .chatbot-toggle-btn { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border: none; border-radius: 50%;
  background: var(--secondary, #ffa500); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; transition: transform .2s; }
.nlu-chat .chatbot-toggle-btn:hover { transform: scale(1.08); }
.nlu-chat .chatbot-popup { position: fixed !important; right: 20px !important; bottom: 172px !important; left: auto !important; top: auto !important;
  width: 400px !important; height: 580px !important; max-width: calc(100vw - 24px); max-height: calc(100vh - 180px);
  background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.28); display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.97); transition: opacity .2s, transform .2s, visibility .2s; }
.nlu-chat .chatbot-popup.active { opacity: 1 !important; visibility: visible !important; transform: none !important; }
.nlu-chat .chatbot-header { background: var(--primary, #458e42); color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.nlu-chat .chat-title { display: flex; align-items: center; gap: 8px; }
.nlu-chat .chat-title h5 { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.nlu-chat .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #7CFC9A; box-shadow: 0 0 8px #7CFC9A; }
.nlu-chat .chat-close-btn { background: none; border: none; color: rgba(255,255,255,.85); font-size: 18px; cursor: pointer; }
@media (max-width: 576px) {
  .nlu-chat { right: 14px; bottom: 92px; }
  .nlu-chat .chatbot-popup { right: 12px !important; bottom: 154px !important; width: calc(100vw - 24px) !important; height: calc(100vh - 170px) !important; max-height: none; }
}
.nlu-chat .chatbot-body { display: flex; flex-direction: column; min-height: 0; }
.nc-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f6f8f6; }
.nc-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.nc-bot { background: #fff; border: 1px solid #e3e9e3; align-self: flex-start; border-bottom-left-radius: 4px; }
.nc-user { background: var(--primary, #458e42); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.nc-msg a { color: #1b6b2f; text-decoration: underline; word-break: break-all; }
.nc-user a { color: #fff; }
.nc-err { background: #fdecea; border-color: #f5c2c0; color: #8a1c1c; }
.nc-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #9bb59a; animation: ncDot 1s infinite; }
.nc-typing span:nth-child(2) { animation-delay: .15s; } .nc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ncDot { 50% { transform: translateY(-4px); opacity: .5; } }
.nc-chips { display: flex; gap: 6px; padding: 8px 10px 0; overflow-x: auto; background: #f6f8f6; }
.nc-chip { flex: none; border: 1px solid #cfe0ce; background: #fff; color: #2e7d32; border-radius: 16px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.nc-chip:hover { background: #eaf4e9; }
.nc-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e6ece6; background: #fff; }
.nc-input { flex: 1; border: 1px solid #cfd8cf; border-radius: 20px; padding: 8px 14px; font-size: 14px; outline: none; }
.nc-input:focus { border-color: var(--primary, #458e42); }
.nc-send { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--primary, #458e42); color: #fff; }
.nc-send:disabled { opacity: .5; }
.nc-foot { font-size: 11px; color: #888; text-align: center; padding: 0 10px 8px; background: #fff; }

/* ===== Trang chương mục / bài viết / menu bên phải ===== */
.cms-page { padding: 24px 0 56px; background: #fff; }
.cms-breadcrumb { font-size: 14px; margin-bottom: 18px; padding: 10px 14px; background: #f4f8f2; border-radius: 8px; }
.cms-breadcrumb a { color: #2e7d32; text-decoration: none; }
.cms-title { font-size: 1.75rem; font-weight: 700; color: #0d4f8b; line-height: 1.3; margin-bottom: .5rem; }
.cms-desc { color: #555; margin-bottom: 1rem; }
.cms-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: #777; font-size: 14px; }
.cms-meta a { color: #2e7d32; text-decoration: none; }
.cms-share a { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%;
               background: #eef3f8; color: #0d4f8b; margin-left: 4px; text-decoration: none; }
.cms-list .cms-item { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid #eceff1; }
.cms-item-img { flex: 0 0 240px; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: #eef2f5; }
.cms-item-img img, .cms-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cms-item:hover .cms-item-img img, .cms-card:hover .cms-card-img img { transform: scale(1.04); }
.cms-item-body h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 6px; line-height: 1.4; }
.cms-item-body h2 a, .cms-card h2 a { color: #1f2933; text-decoration: none; }
.cms-item-body h2 a:hover, .cms-card h2 a:hover { color: #2e7d32; }
.cms-item-body p { margin: 8px 0 0; color: #555; font-size: 15px; }
.cms-card { height: 100%; border: 1px solid #e6eaee; border-radius: 10px; overflow: hidden; background: #fff; }
.cms-card-img { display: block; aspect-ratio: 16/10; overflow: hidden; background: #eef2f5; }
.cms-card-body { padding: 12px 14px; }
.cms-card-body time { font-size: 13px; color: #888; }
.cms-card h2 { font-size: 1.02rem; font-weight: 600; margin: 4px 0 0; line-height: 1.4; }
.cms-summary { font-weight: 600; color: #333; font-size: 1.05rem; margin-bottom: 1rem; padding-left: 12px; border-left: 4px solid #5aa428; }
.cms-body { font-size: 16.5px; line-height: 1.7; color: #222; overflow-wrap: anywhere; }
.cms-body h2, .cms-body h3, .cms-body h4 { color: #0d4f8b; margin: 1.4em 0 .6em; }
.cms-body table { border-collapse: collapse; margin: 1em 0; }
.cms-body td, .cms-body th { border: 1px solid #d0d7de; padding: 6px 10px; }
.cms-body iframe { max-width: 100%; }
.cms-body figure { display: table; margin: 1em auto; } .cms-body figcaption { display: table-caption; caption-side: bottom; text-align: center; color: #666; font-size: 14px; padding-top: 6px; }
.cms-body blockquote { border-left: 4px solid #cfe3c4; padding: 4px 16px; color: #444; background: #f7fbf5; }
.cms-body a[href$=".pdf"], .cms-body a[href$=".docx"], .cms-body a[href$=".xlsx"] { font-weight: 600; }
.cms-related { margin-top: 40px; padding-top: 20px; border-top: 2px solid #e8f0e4; }
.cms-related h2 { font-size: 1.2rem; font-weight: 700; color: #0d4f8b; margin-bottom: 14px; }
.cms-related-item { display: flex; gap: 10px; text-decoration: none; color: #1f2933; }
.cms-related-item img { flex: 0 0 96px; width: 96px; height: 64px; object-fit: cover; border-radius: 6px; }
.cms-related-item span { font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.cms-related-item time, .cms-side-news time { display: block; font-size: 12.5px; color: #888; font-weight: 400; margin-top: 3px; }
/* Menu bên phải */
.cms-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 20px; }
.cms-side-block { border: 1px solid #e3e9e0; border-radius: 10px; overflow: hidden; background: #fff; }
.cms-side-title { margin: 0; padding: 11px 16px; font-size: 1rem; font-weight: 700; color: #fff; background: linear-gradient(90deg, #2e7d32, #5aa428); text-transform: uppercase; letter-spacing: .02em; }
.cms-side-title a { color: #fff; text-decoration: none; }
.cms-side-menu { list-style: none; margin: 0; padding: 6px 0; }
.cms-side-menu li a { display: flex; gap: 6px; align-items: baseline; padding: 8px 16px; color: #24323d; text-decoration: none; font-size: 15px; border-left: 3px solid transparent; }
.cms-side-menu li a:hover { background: #f1f7ee; color: #2e7d32; }
.cms-side-menu li.active a { border-left-color: #2e7d32; background: #eaf4e5; color: #1b5e20; font-weight: 600; }
.cms-side-menu i { color: #5aa428; }
.cms-side-news { list-style: none; margin: 0; padding: 8px 12px; }
.cms-side-news li + li { border-top: 1px dashed #e3e9e0; }
.cms-side-news a { display: flex; gap: 10px; padding: 8px 0; color: #24323d; text-decoration: none; font-size: 14px; line-height: 1.35; }
.cms-side-news a:hover { color: #2e7d32; }
.cms-side-news img { flex: 0 0 72px; width: 72px; height: 50px; object-fit: cover; border-radius: 5px; }
@media (max-width: 991.98px) { .cms-sidebar { position: static; } }
@media (max-width: 575.98px) {
  .cms-list .cms-item { flex-direction: column; gap: 10px; }
  .cms-item-img { flex-basis: auto; }
  .cms-title { font-size: 1.4rem; }
}
@media print { .cms-sidebar, .cms-related, .cms-share, header, footer, .top-header, .beta-bar { display: none !important; } }

/* ===== Thời tiết nổi bên phải (trang chủ): dọc, nền trắng trong 50% ===== */
.wxf { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 9990; width: 128px;
       background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
       border: 1px solid rgba(255,255,255,.7); border-radius: 18px; box-shadow: 0 8px 28px rgba(0,0,0,.12);
       color: #12324a; text-align: center; padding: 12px 10px 10px; transition: width .3s, padding .3s, border-radius .3s; }
.wxf-toggle { position: absolute; left: -13px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%;
              border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.85); color: #2e7d32; font-size: 11px; display: flex;
              align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.wxf-place { font-size: 10.5px; font-weight: 600; line-height: 1.25; opacity: .85; }
.wxf-icon { width: 64px; height: 64px; margin: 6px auto 2px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); }
.wxf-icon .wx-ic { width: 100%; height: 100%; }
.wxf-temp { font-size: 34px; font-weight: 800; line-height: 1; color: #0d4f8b; }
.wxf-temp sup { font-size: 14px; font-weight: 700; top: -1em; }
.wxf-label { font-size: 13px; font-weight: 700; margin-top: 4px; }
.wxf-feels { font-size: 11px; opacity: .8; }
.wxf-stats { list-style: none; margin: 8px 0 4px; padding: 6px 0 0; border-top: 1px solid rgba(18,50,74,.12); display: flex; flex-direction: column; gap: 6px; }
.wxf-stats li { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 6px; text-align: left; align-items: center; }
.wxf-stats i { grid-row: span 2; font-size: 15px; color: #2e7d32; text-align: center; }
.wxf-stats b { font-size: 15px; line-height: 1.1; }
.wxf-stats small { font-size: 10px; opacity: .75; line-height: 1.1; }
.wxf-time { font-size: 10px; opacity: .7; }
.wxf-mini { display: none; font-size: 15px; font-weight: 800; color: #0d4f8b; }
.wxf.collapsed { width: 48px; padding: 10px 4px; border-radius: 24px; }
.wxf.collapsed .wxf-body { display: none; } .wxf.collapsed .wxf-mini { display: block; }
.wxf.collapsed .wxf-toggle i { transform: rotate(180deg); }
.wxf[data-cond="night"], .wxf[data-cond="night-rain"] { background: rgba(255,255,255,.5); }
/* Nút đăng nhập nổi trên khung thời tiết (13/10/2026) */
.wxf-login { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 7px;
             padding: 9px 16px; border-radius: 999px; background: #0b6b3a; color: #fff !important; font-size: 14px; font-weight: 700; line-height: 1;
             white-space: nowrap; text-decoration: none; box-shadow: 0 6px 18px rgba(11,107,58,.35); border: 2px solid rgba(255,255,255,.85);
             transition: background .2s, transform .2s, box-shadow .2s; animation: wxf-login-pulse 2.6s ease-in-out 1s 3; }
.wxf-login:hover, .wxf-login:focus-visible { background: #f5a623; color: #1d2621 !important; transform: translateX(-50%) translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.22); }
.wxf-login i { font-size: 14px; }
.wxf-login.is-in { background: #fff; color: #0b6b3a !important; border-color: #0b6b3a; }
.wxf.collapsed .wxf-login { padding: 0; width: 40px; height: 40px; justify-content: center; }
.wxf.collapsed .wxf-login span { display: none; }
.wxf-login-solo { position: fixed; left: auto; right: 12px; bottom: auto; top: 40%; transform: none; z-index: 9990; }
.wxf-login-solo:hover { transform: translateY(-2px); }
@keyframes wxf-login-pulse { 0%, 100% { box-shadow: 0 6px 18px rgba(11,107,58,.35); } 50% { box-shadow: 0 0 0 7px rgba(11,107,58,.18), 0 6px 18px rgba(11,107,58,.35); } }
@media (prefers-reduced-motion: reduce) { .wxf-login { animation: none; } }
@media (max-width: 991.98px) { .wxf { top: auto; bottom: 180px; transform: none; } }
@media (max-width: 575.98px) { .wxf:not(.expanded) { width: 48px; padding: 10px 4px; border-radius: 24px; }
  .wxf:not(.expanded) .wxf-body { display: none; } .wxf:not(.expanded) .wxf-mini { display: block; }
  .wxf:not(.expanded) .wxf-login { padding: 0; width: 40px; height: 40px; justify-content: center; } .wxf:not(.expanded) .wxf-login span { display: none; } }

/* ===== Box Trợ lý AI giữa trang chủ ===== */
.nlu-aibox { height: 100%; display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden;
             box-shadow: 0 14px 40px rgba(13,79,139,.12); border: 1px solid #e3ecf3; }
.ab-head { display: flex; gap: 14px; align-items: center; padding: 18px 22px; color: #fff;
           background: linear-gradient(120deg, #0d4f8b 0%, #1986ca 55%, #2e7d32 100%); }
.ab-head h2 { margin: 0; font-size: 22px; font-weight: 800; color: #fff; }
.ab-head p { margin: 2px 0 0; font-size: 13.5px; opacity: .92; }
.ab-avatar { position: relative; flex: none; width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.18);
             display: flex; align-items: center; justify-content: center; font-size: 26px; }
.ab-dot { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: #7CFC9A; border: 2px solid #fff; box-shadow: 0 0 10px #7CFC9A; }
.nlu-aibox .ab-msgs { flex: 1; min-height: 200px; max-height: 360px; }
.ab-form { border-top: 1px solid #e6ece6; }
.ab-input-wrap { position: relative; flex: 1; }
.ab-input { width: 100%; padding: 12px 16px !important; font-size: 15px !important; border-radius: 26px !important; }
.ab-typer { position: absolute; left: 17px; right: 16px; top: 50%; transform: translateY(-50%); color: #8a9aa8; font-size: 15px;
            pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-typer::after { content: '|'; margin-left: 1px; color: #1986ca; animation: abBlink 1s steps(1) infinite; }
.ab-input:not(:placeholder-shown) + .ab-typer, .ab-input.has-text + .ab-typer { display: none; }
.ab-send { width: 46px !important; height: 46px !important; flex: none; }
.ab-hint { font-size: 12px; color: #6b7c8a; padding: 0 16px 6px; }
.ab-marquee { overflow: hidden; padding: 4px 0 10px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
              mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ab-track { display: flex; gap: 8px; width: max-content; animation: abScroll 90s linear infinite; }
.ab-marquee:hover .ab-track, .ab-marquee:focus-within .ab-track { animation-play-state: paused; }
.ab-chip { flex: none; border: 1px solid #cfe0ef; background: #f3f8fc; color: #0d4f8b; border-radius: 18px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ab-chip:hover { background: #e3f0fa; border-color: #1986ca; }
.ab-chip i { color: #2e7d32; margin-right: 3px; }
.nlu-aibox .nc-foot { font-size: 11px; color: #8a96a0; padding: 0 16px 12px; }
/* Bản gọn trong ảnh chào mừng (dưới khẩu hiệu) */
.nlu-aibox.ab-hero { width: min(860px, calc(100vw - 32px)); margin: 18px auto 22px; height: auto; position: relative; z-index: 5;
  background: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.45); box-shadow: 0 18px 50px rgba(0,0,0,.22); border-radius: 22px; text-align: left; }
.ab-hero .ab-mini-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 4px; color: #fff; font-size: 15px; }
.ab-hero .ab-mini-head b { font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.ab-hero .ab-mini-sub { font-size: 12.5px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-hero .ab-mini-avatar { position: relative; flex: none; width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; }
.ab-hero .ab-mini-avatar .ab-dot { width: 10px; height: 10px; }
.ab-hero .ab-close { margin-left: auto; background: rgba(255,255,255,.25); color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; flex: none; }
.ab-hero .ab-msgs { display: none; background: rgba(255,255,255,.92); margin: 8px 12px 0; border-radius: 14px; min-height: 0; max-height: 34vh; }
.ab-hero.has-chat .ab-msgs { display: flex; }
.ab-hero .ab-form { border-top: none; background: transparent; padding: 8px 12px; }
.ab-hero .ab-input { background: rgba(255,255,255,.96); border-color: transparent !important; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.ab-hero .ab-send { background: #f5a623 !important; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.ab-hero .ab-marquee { padding: 2px 0 6px; }
.ab-hero .ab-chip { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); color: #fff; }
.ab-hero .ab-chip:hover { background: rgba(255,255,255,.32); }
.ab-hero .ab-chip i { color: #ffe08a; }
.ab-hero .nc-foot { color: rgba(255,255,255,.8); padding-bottom: 10px; text-align: center; }
@media (max-width: 575.98px) { .ab-hero .ab-mini-sub { display: none; } .ab-hero .nc-foot { display: none; } }
@keyframes abScroll { to { transform: translateX(-50%); } }
@keyframes abBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ab-track { animation: none; flex-wrap: wrap; width: auto; } }
/* Theme tô chữ chuyển màu cho span trong ảnh chào mừng => ép lại màu cho chữ của box AI */
.ab-hero span, .ab-hero b { -webkit-text-fill-color: currentColor; background: none; -webkit-background-clip: border-box; background-clip: border-box; }
.ab-hero .ab-typer { color: #6b7c8a !important; -webkit-text-fill-color: #6b7c8a !important; }
.ab-hero .ab-mini-head, .ab-hero .ab-mini-head b, .ab-hero .ab-mini-sub { color: #fff !important; -webkit-text-fill-color: #fff !important; }
.ab-hero .ab-dot { background: #7CFC9A !important; }
.ab-hero .nc-foot { background: transparent; }
.wxf-mini { font-size: 13px; letter-spacing: -.02em; cursor: pointer; white-space: nowrap; }
.wxf.collapsed, .wxf:not(.expanded) { min-width: 56px; }
@media (min-width: 576px) { .wxf:not(.collapsed) { min-width: 0; } }

/* ===== Ảnh chào mừng gọn hơn để dãy ảnh lên màn hình đầu (11/10/2026) ===== */
.home-page .area-top { padding-top: 22px !important; padding-bottom: 14px !important; }
.home-page .area-top .content-box h2 { font-size: 14px !important; margin: 0 0 2px !important; letter-spacing: .04em; }
.home-page .area-top .content-box h1 { font-size: 28px !important; margin: 2px 0 !important; line-height: 1.2; }
.home-page .area-top .content-box h1 span:nth-child(2) { font-size: .82em; }
.home-page .area-top .content-box .logo-wrap { width: 88px !important; height: 88px !important; margin: 6px auto !important; }
.home-page .area-top .content-box .logo-img { width: 84px !important; margin: 2px 0 !important; }
.home-page .area-top .content-box h3 { font-size: clamp(1rem, 1.4vw, 1.25rem) !important; margin-bottom: 4px !important; }
.home-page .area-top .story-eff { margin-top: 6px; }
.home-page .area-top .scroll-hint { display: none; }
@media (max-width: 768px) {
  .home-page .area-top .content-box h1 { font-size: 21px !important; }
  .home-page .area-top .content-box .logo-wrap { width: 70px !important; height: 70px !important; }
  .home-page .area-top .content-box .logo-img { width: 66px !important; }
  .home-page .area-top .content-box { margin-bottom: 12px !important; }
}

/* ===== Box AI gọn & trong hơn, linh vật robot ở đầu ===== */
.nlu-aibox.ab-hero { width: min(720px, calc(100vw - 32px)); margin: 10px auto 12px; border-radius: 30px;
  background: rgba(255,255,255,.12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.32); box-shadow: 0 10px 30px rgba(0,0,0,.14); overflow: visible; }
.ab-hero .ab-form { padding: 7px 8px 4px; gap: 8px; align-items: center; }
.ab-hero .ab-input { padding: 9px 14px !important; font-size: 14px !important; background: rgba(255,255,255,.9); }
.ab-hero .ab-typer { font-size: 14px; left: 15px; }
.ab-hero .ab-send { width: 40px !important; height: 40px !important; }
.ab-hero .ab-chip { font-size: 12px; padding: 4px 10px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); }
.ab-hero .ab-marquee { padding: 2px 0 4px; }
.ab-hero .nc-foot { font-size: 10px; padding: 0 12px 6px; opacity: .85; }
.ab-hero .ab-msgs { margin: 10px 12px 0; }
.ab-hero .ab-close { position: absolute; top: -12px; right: -6px; z-index: 6; width: 28px; height: 28px; border-radius: 50%; border: none;
  background: #fff; color: #1e3a5f; box-shadow: 0 3px 10px rgba(0,0,0,.2); font-size: 13px; }
/* Linh vật */
.ab-mascot { position: relative; flex: none; width: 46px; height: 46px; animation: abBounce 2.4s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); cursor: default; }
.ab-bot { display: block; transform-origin: 50% 90%; animation: abTilt 4.8s ease-in-out infinite; }
.ab-bot-eyes { transform-box: fill-box; transform-origin: center; animation: abBlinkEye 4s infinite; }
.ab-bot-ant { animation: abGlow 1.4s ease-in-out infinite; }
.ab-spark { position: absolute; top: -6px; right: -4px; font-style: normal; color: #fff59d; font-size: 14px; text-shadow: 0 0 6px #fff; animation: abTwinkle 1.8s ease-in-out infinite; }
.ab-bubble { position: absolute; left: 34px; top: -22px; white-space: nowrap; background: #fff; color: #e65100 !important; -webkit-text-fill-color: #e65100 !important;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px 10px 10px 2px; box-shadow: 0 3px 8px rgba(0,0,0,.18); animation: abPop 6s ease-in-out infinite; }
.ab-hero.has-chat .ab-bubble { display: none; }
@keyframes abBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes abTilt { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-10deg); } 86% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }
@keyframes abBlinkEye { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes abGlow { 50% { fill: #fff59d; filter: drop-shadow(0 0 4px #fff59d); } }
@keyframes abTwinkle { 0%, 100% { opacity: .2; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
@keyframes abPop { 0%, 8% { opacity: 0; transform: translateY(4px) scale(.8); } 14%, 60% { opacity: 1; transform: none; } 68%, 100% { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ab-mascot, .ab-bot, .ab-bot-eyes, .ab-bot-ant, .ab-spark, .ab-bubble { animation: none; } }
@media (max-width: 575.98px) { .ab-mascot { width: 38px; height: 38px; } .ab-bot { width: 38px; height: 38px; } .ab-bubble { display: none; } }
.home-page .area-top .content-box h1.animation span:nth-child(1) { font-size: 34px !important; }
.home-page .area-top .content-box h1.animation span:nth-child(2) { font-size: 22px !important; }
@media (max-width: 768px) { .home-page .area-top .content-box h1.animation span:nth-child(1) { font-size: 22px !important; }
  .home-page .area-top .content-box h1.animation span:nth-child(2) { font-size: 16px !important; } }
.ab-hero .ab-mascot .ab-bubble { background: #fff !important; }
/* Box Đào tạo: 3 số liệu (ngành, giảng viên, sinh viên) chia đều trên màn hình lớn */
@media (min-width: 768px) {
  .home-page .stats-swiper .swiper-wrapper { justify-content: center; transform: none !important; }
  .home-page .stats-swiper .swiper-slide { width: 33.333% !important; margin-right: 0 !important; }
}
/* Thẻ "Lớp học của tôi" (hệ thống lớp học /giangvien/lophoc) */
.nlu-card-class { border-top-color: #c8a03a; }
.nlu-card-class .lk-list { list-style: none; margin: 4px 0 14px; padding: 0; flex: 1; }
.nlu-card-class .lk-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed #e5ebe6; font-size: 14.5px; line-height: 1.4; }
.nlu-card-class .lk-list li:last-child { border-bottom: 0; }
.nlu-card-class .lk-list i { color: var(--primary, #458e42); margin-top: 3px; width: 16px; text-align: center; }
.nlu-card-class .lk-list small { display: block; color: #6b7a70; font-size: 12.5px; }
/* Box AI giữa trang: chữ hội thoại kế thừa màu trắng của ảnh chào mừng => ép màu tối cho dễ đọc (12/10/2026) */
.ab-hero .ab-msgs .nc-bot, .ab-hero .ab-msgs .nc-bot * { color: #1f2d3a !important; -webkit-text-fill-color: #1f2d3a !important; }
.ab-hero .ab-msgs .nc-bot a { color: #1b6b2f !important; -webkit-text-fill-color: #1b6b2f !important; }
.ab-hero .ab-msgs .nc-user, .ab-hero .ab-msgs .nc-user * { color: #fff !important; -webkit-text-fill-color: #fff !important; }
.ab-hero .ab-msgs .nc-typing span { background: #8a9aa8 !important; }
.ab-hero .ab-input { color: #1f2d3a !important; -webkit-text-fill-color: #1f2d3a !important; }
/* Tin đơn vị trên box trang chủ: tóm tắt 2 dòng + tên đơn vị */
.news-card-summary { font-size: 13.5px; line-height: 1.45; color: #55635a; margin: 4px 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; }
.news-card-source { display: block; font-size: 12px; color: #2e7d32; font-weight: 600; text-align: center; }
/* Chatbot → Hỏi đáp thống nhất: nút gửi câu hỏi cho đơn vị phụ trách (13/10/2026) */
.nc-escalate { align-self: flex-start; font-size: 12.5px; color: #1b6b2f; background: #e7f4ec; border: 1px solid #cfe3d6; border-radius: 14px; padding: 4px 10px; text-decoration: none; margin-top: -4px; }
.nc-escalate:hover { background: #d8eedf; }

/* Dải tin chạy ở top-header thay cho dòng menu phụ (15/10/2026) */
.top-header .news-ticker { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; margin: 0 16px; overflow: hidden; }
.news-ticker-label { flex: none; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #fff; background: #e8590c; border-radius: 3px; padding: 2px 8px; white-space: nowrap; }
.news-ticker-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.news-ticker-track { display: inline-flex; white-space: nowrap; animation: nlu-ticker 90s linear infinite; }
.news-ticker:hover .news-ticker-track, .news-ticker:focus-within .news-ticker-track { animation-play-state: paused; }
.news-ticker-track a { color: inherit; font-size: 13px; text-decoration: none; padding: 0 18px; position: relative; }
.news-ticker-track a::before { content: "•"; position: absolute; left: 4px; color: #e8590c; }
.news-ticker-track a:hover { text-decoration: underline; }
@keyframes nlu-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .news-ticker-track { animation-duration: 400s; } }
@media (max-width: 767px) { .top-header .news-ticker { display: none; } }
