/* FME Portal V8 — one coherent design system over the exact original client workflows.
   Keep authored content, screen order, and the client's React runtime untouched. */
:root {
  --fme-navy: #102d49;
  --fme-navy-deep: #0a2035;
  --fme-blue: #1a5f8e;
  --fme-blue-soft: #eaf3f9;
  --fme-coral: #e79a58;
  --fme-teal: #19828c;
  --fme-ink: #18344d;
  --fme-muted: #5f7488;
  --fme-border: #dae5ec;
  --fme-page: #f4f7fa;
  --fme-shadow: 0 14px 42px rgba(15, 42, 67, .065);
  --fme-shadow-hover: 0 20px 48px rgba(15, 42, 67, .135);
  --fme-font: "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--fme-font) !important; color: var(--fme-ink); }
body.fme-publication { background: var(--fme-page); }
body.fme-publication #root > div,
body.fme-publication #root > div > div,
body.fme-publication :is(button, input, select, textarea) { font-family: var(--fme-font) !important; }
body.fme-publication #root > div { color: var(--fme-ink); }
body.fme-publication *, body[data-fme-page="portal"] *, body[data-fme-page="dang-nhap"] * { box-sizing: border-box; }
/* focus chung: bỏ khung cam 3px (#e79a58) gây chói; chỉ
    viền xanh dương nhạt 2px hợp tông thiết kế, vẫn thấy rõ trên nền trắng. */
:focus-visible { outline: 2px solid #6ea3cc !important; outline-offset: 2px !important; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
a, button { transition: color .2s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease, transform .2s ease; }
:disabled { opacity: .6; cursor: not-allowed !important; }
.fme-skip { position: fixed; z-index: 200; top: -100px; left: 18px; background: #fff; color: var(--fme-navy); border-radius: 12px; box-shadow: var(--fme-shadow); padding: 10px 16px; }
.fme-skip:focus { top: 12px; }
.fme-inline-message { display: block; padding: 12px 16px; margin-bottom: 14px; background: #e7f5f4; color: #165e62; border: 1px solid #bae2df; border-left: 4px solid var(--fme-teal); border-radius: 12px; font-weight: 650; font-size: 13px; box-shadow: 0 8px 20px #1746590a; }
.fme-inline-message.is-error { background: #fff1ee; border-color: #f0cbc3; border-left-color: #d65d48; color: #903b30; }
.fme-inline-message[hidden] { display: none; }
.fme-ux-toast { position: fixed; bottom: 24px; right: 24px; z-index: 150; background: var(--fme-navy); color: #fff; padding: 13px 18px; max-width: min(360px, calc(100vw - 36px)); border-radius: 14px; border: 1px solid #ffffff33; box-shadow: 0 16px 46px #061b2e55; font-size: 13px; font-weight: 600; }

/* CLIENT'S PUBLIC WEBSITE — preserve all editorial sections, improve presentation. */
body[data-fme-page="index"] .hdr,
body.fme-publication .hdr-in { backdrop-filter: saturate(1.16); }
body[data-fme-page="index"] .hdr { background: #102d49 !important; border-bottom: 1px solid #ffffff20; }
body[data-fme-page="index"] .hdr-in { padding-block: 15px !important; }
body[data-fme-page="index"] .nav { background: #103452 !important; }
body[data-fme-page="index"] .nav-in { min-height: 49px; }
body[data-fme-page="index"] .nav .nv > a,
body.fme-publication .hnav a { border-radius: 9px; }
body[data-fme-page="index"] .nav .nv > a:hover,
body.fme-publication .hnav a:hover { background: #ffffff15 !important; }
body.fme-publication .hdr-in .hb,
body.fme-publication header .hb { border-radius: 11px !important; }
body[data-fme-page="index"] .bn { height: min(440px, 49vw) !important; min-height: 335px; }
/* HERO-CLAMP — tieu de/mo ta banner lay nguyen van tu bai viet nen co the
    dai hon khung 440px, de len hang nut dieu khien + nut CTA (slide Tin tuc
    211 ky tu = 8 dong, chu tran 110px xuong nut, CTA khuat sau khoi doi
    tuong). Tieu de cat 3 dong; mo ta cat 2 dong — thu 3+3 van de nut 2px
    nen mo ta xuong 2 dong de chừa khoang trong; noi dung
    day du van o trang bai viet. */
body[data-fme-page="index"] .bn-panel h1 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body[data-fme-page="index"] .bn-panel p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* RESEARCH-HOME-LATEST-TOPIC — tieu de/mo ta de tai moi nhat lay nguyen van
   tu API nen co the dai hon the; cat tieu de 2 dong, mo ta 2 dong (theo mau
   hero-clamp tren) de the trong luoi 2 cot khong vo chieu cao. Mobile
   <=820px khong can luat moi: <style> inline trong index.html da co
   .rgrid{grid-template-columns:1fr !important} o breakpoint nay. */
body[data-fme-page="index"] #research .rgrid .rtopic-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body[data-fme-page="index"] #research .rgrid .rtopic-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body[data-fme-page="index"] .bn:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b263c38 0%, transparent 65%); pointer-events: none; }
body[data-fme-page="index"] .bn-ctl { z-index: 4 !important; }
body[data-fme-page="index"] .aud { border: 1px solid #e5ecf1 !important; border-radius: 18px !important; overflow: hidden; box-shadow: 0 18px 46px #0c345724 !important; }
body[data-fme-page="index"] .aud a { transition: transform .2s, background-color .2s; }
body[data-fme-page="index"] .aud a:hover { background: #f0f6fa !important; transform: translateY(-2px); }
body[data-fme-page="index"] .stats-sec { padding-top: 40px !important; }
body.fme-publication .rv:not(#programs) { background-image: linear-gradient(180deg, transparent 0, #fff6 100%); }
body.fme-publication section.rv { padding-block: clamp(42px, 5.4vw, 70px) !important; }
body[data-fme-page="index"] #programs { background: linear-gradient(120deg,#102e49,#184a68) !important; }
body[data-fme-page="index"] #programs [style*="background:#fff"],
body[data-fme-page="index"] #programs [style*="background: #fff"] { border-radius: 15px !important; }
body.fme-publication .blueprint { position: relative; }
body.fme-publication .lift { border-radius: 14px !important; }
body.fme-publication .lift:hover { box-shadow: var(--fme-shadow-hover) !important; transform: translateY(-3px); }
body.fme-publication .zoom { overflow: hidden; border-radius: 14px !important; }
body.fme-publication .zoom img { transition: transform .45s ease; }
body.fme-publication .zoom:hover img { transform: scale(1.04); }
body[data-fme-page="index"] #tin-tuc [style*="background:#fff"],
body[data-fme-page="index"] #cooperation [style*="background:#fff"],
body[data-fme-page="index"] #tuyen-dung [style*="background:#fff"] { border-radius: 15px !important; box-shadow: var(--fme-shadow); }
body[data-fme-page="index"] #lien-he input,
body[data-fme-page="index"] #lien-he textarea { border-radius: 10px !important; background: #fff !important; }
body[data-fme-page="index"] footer { border-top: 4px solid #2a6585; }

/* PUBLIC STUDENT/FACULTY ENTRY/CONFERENCE: original imagery and widgets retained. */
body:is([data-fme-page="sinh-vien"],[data-fme-page="cong-giang-vien"],[data-fme-page="hoi-nghi"]) #root > div > div:first-child { background-color: var(--fme-navy) !important; }
/* .hdr-in phải trong suốt để nền header đồng nhất với
    nền ngoài .hdr (#1a3062); trước đây navy #102d49 tạo thành dải khác màu. */
body:is([data-fme-page="sinh-vien"],[data-fme-page="cong-giang-vien"],[data-fme-page="hoi-nghi"]) .hdr-in { background-color: transparent !important; }
body.fme-publication .hnav { gap: 6px !important; }
body.fme-publication .hnav a { border-radius: 9px; padding: 9px 13px !important; }
body.fme-publication .pg-hero { min-height: 285px !important; background: var(--fme-navy-deep) !important; }
body.fme-publication .pg-hero-img img { object-fit: cover; }
body.fme-publication .pg-hero-txt { background: linear-gradient(100deg,#0d2944 5%,#0d2944ee 70%,#0d2944c2 100%) !important; width: 64% !important; padding-block: 34px !important; }
body.fme-publication .pg-hero-txt h1 { font-size: clamp(26px, 2.8vw, 37px) !important; letter-spacing: -.035em; }
body.fme-publication :is(.tiles,.feats) > * { border-radius: 15px !important; box-shadow: var(--fme-shadow); }
body.fme-publication .tile:hover,
body.fme-publication .feat:hover { border-color: #82adca !important; box-shadow: var(--fme-shadow-hover) !important; }
body.fme-publication .body main > div:has(.chip) { align-items: center; }
body.fme-publication .chip { border-radius: 999px !important; padding: 8px 14px !important; white-space: nowrap; }
body.fme-publication .nrow { border-radius: 12px; background: #fff; box-shadow: 0 6px 20px #0f30450c; }
body.fme-publication .nrow:hover { box-shadow: 0 12px 26px #0f30451a; background: #fcfdff; }
body.fme-publication .body aside > div { border-radius: 15px !important; overflow: hidden; }
body.fme-publication footer { background: #0a263e !important; }
body[data-fme-page="hoi-nghi"] .tabs { background: #103452 !important; overflow-x: auto; scrollbar-width: thin; }
body[data-fme-page="hoi-nghi"] .tabs > div { flex-wrap: nowrap !important; min-width: max-content; }
body[data-fme-page="hoi-nghi"] .tabs a { white-space: nowrap; border-radius: 8px 8px 0 0; }
body[data-fme-page="hoi-nghi"] #dang-ky > div { border-radius: 16px !important; box-shadow: var(--fme-shadow); }
body[data-fme-page="hoi-nghi"] :is(input,select) { border-radius: 9px !important; }

/* THE CLIENT'S PRIVATE FACULTY INTERFACE — no alternative generic dashboard. */
body:is([data-fme-page="giang-vien"],[data-fme-page="minh-chung"],[data-fme-page="gop-y"]) #root > div { min-height: 100vh !important; background: #f3f7fa; }
body:is([data-fme-page="giang-vien"],[data-fme-page="minh-chung"],[data-fme-page="gop-y"]) header { background: #102d49 !important; border-bottom: 1px solid #ffffff22; box-shadow: 0 7px 22px #071a2a18 !important; }
body:is([data-fme-page="giang-vien"],[data-fme-page="minh-chung"],[data-fme-page="gop-y"]) header > div { min-height: 76px; padding: 12px clamp(18px,2.7vw,35px) !important; }
body.fme-publication .side { background: linear-gradient(180deg,#112f4a 0%,#0c243b 100%) !important; border-right: 1px solid #ffffff19; padding: 20px 12px !important; min-height: calc(100vh - 76px) !important; }
body.fme-publication .side a { margin: 3px 0; border-radius: 10px !important; border-left: 3px solid transparent; font-weight: 600; }
body.fme-publication .side a:hover { background: #ffffff18 !important; padding-left: 17px !important; }
body.fme-publication .side a[aria-current="page"] { background: #ffffff1e !important; border-left-color: var(--fme-coral) !important; color: white !important; }
body:is([data-fme-page="giang-vien"],[data-fme-page="minh-chung"],[data-fme-page="gop-y"]) main { padding: clamp(20px,2.8vw,40px) clamp(16px,3.3vw,48px) 70px !important; }
body.fme-publication .banner { background: linear-gradient(120deg,#153d5d,#1b5d79) !important; border-radius: 18px !important; box-shadow: 0 18px 45px #0b2b481b; }
body.fme-publication .gbanner { background: linear-gradient(110deg,#153d5d,#1b5d79) !important; border-radius: 16px !important; box-shadow: var(--fme-shadow); }
body.fme-publication main > :is(section,div) > section[style*="background:#fff"],
body.fme-publication main > section[style*="background:#fff"],
body.fme-publication main > div > div[style*="background:#fff"],
body.fme-publication main > div[style*="background:#fff"] { border: 1px solid var(--fme-border); border-radius: 16px !important; box-shadow: var(--fme-shadow); }
body.fme-publication main :is(input:not([type="checkbox"]):not([type="file"]),select,textarea) { border: 1px solid #cbdce5 !important; border-radius: 10px !important; background: #fff !important; color: #173750 !important; padding: 10px 12px !important; min-height: 43px; max-width: 100%; }
body.fme-publication main input[type="file"] { max-width: 100%; }
body.fme-publication main textarea { min-height: 126px; resize: vertical; }
body.fme-publication main label { color: #435b70; }
body.fme-publication main button { border-radius: 10px !important; min-height: 39px; }
body.fme-publication main :is(button,a)[style*="background:#132d65"] { background: var(--fme-blue) !important; }
body.fme-publication main :is(button,a)[style*="background:#132d65"]:hover { background: #104b71 !important; }
body.fme-publication main h1 { letter-spacing: -.025em; line-height: 1.25; }
body.fme-publication main h2 { line-height: 1.35; }
body[data-fme-page="minh-chung"] main ol { border: 1px solid var(--fme-border); overflow: hidden; border-radius: 13px !important; box-shadow: var(--fme-shadow); }
body[data-fme-page="minh-chung"] main ol button { min-height: 74px; border-radius: 0 !important; }
body[data-fme-page="minh-chung"] main ol button:hover { background: #eaf2f7 !important; }
body[data-fme-page="gop-y"] main .doc { border-radius: 11px !important; }
body[data-fme-page="gop-y"] main .hl { background: #fff3e6; border-radius: 6px; }

/* CMS / ROLE PORTAL — same typography, spacing and colors, less visual clutter. */
body[data-fme-page="portal"] { font-family: var(--fme-font); background: var(--fme-page); }
body[data-fme-page="portal"] .sidebar { background: linear-gradient(180deg,#102e49,#0a2239); width: 248px; min-width: 248px; }
body[data-fme-page="portal"] .brand-mark { border-bottom-color: var(--fme-coral); border-radius: 9px; }
body[data-fme-page="portal"] .nav-link { font-size: 13px; border-radius: 10px; padding: 11px 13px; }
body[data-fme-page="portal"] .nav-link.active { background: #ffffff24; box-shadow: inset 3px 0 var(--fme-coral); }
body[data-fme-page="portal"] .topbar { background: #ffffffeb; backdrop-filter: blur(10px); min-height: 70px; }
body[data-fme-page="portal"] .workspace main { padding-top: clamp(22px,3vw,36px); }
body[data-fme-page="portal"] .pagehead { gap: 16px; }
body[data-fme-page="portal"] .pagehead h1 { font-weight: 800; color: #102e49; }
body[data-fme-page="portal"] .pagehead p { font-size: 13px; }
body[data-fme-page="portal"] .card { border-radius: 16px; box-shadow: var(--fme-shadow); padding: clamp(17px,2vw,24px); }
body[data-fme-page="portal"] .card.stat { border-top: 3px solid #4195aa; }
body[data-fme-page="portal"] .card:hover { border-color: #bfd5e1; }
body[data-fme-page="portal"] .grid { gap: 14px; }
body[data-fme-page="portal"] .btn,
body[data-fme-page="portal"] .field { border-radius: 10px; }
body[data-fme-page="portal"] .btn.primary { background: #17658a; border-color: #17658a; }
body[data-fme-page="portal"] .btn.primary:hover { background: #0f4f70; }
body[data-fme-page="portal"] .tag { font-size: 11px; }
body[data-fme-page="portal"] .table-wrap { border-radius: 12px; }
body[data-fme-page="portal"] table th { background: #eef4f8; }
body[data-fme-page="portal"] table td { padding-block: 14px; }
body[data-fme-page="portal"] .modal { border-radius: 18px; }
body[data-fme-page="portal"] .hero,
body[data-fme-page="portal"] .personal-hero { border-radius: 17px; background: linear-gradient(115deg,#13364f,#1f627e); }
body[data-fme-page="portal"] .demo-pill { background: #fff2de; color: #8f5b19; }
body[data-fme-page="dang-nhap"] { font-family: var(--fme-font); }
body[data-fme-page="dang-nhap"] .auth-story { background: radial-gradient(circle at 80% 12%,#32798d 0,transparent 48%),linear-gradient(145deg,#09253e,#123e5c); }
body[data-fme-page="dang-nhap"] .auth-card { border-radius: 20px; box-shadow: var(--fme-shadow); }
body[data-fme-page="dang-nhap"] .auth-cta { border-radius: 11px; background: #186c8a; }
body[data-fme-page="dang-nhap"] .auth-cta:hover { background: #0f516d; }

@media (max-width: 1100px) {
  body[data-fme-page="portal"] .sidebar { width: 232px; min-width: 232px; }
  body.fme-publication .pg-hero-txt { width: 70% !important; }
  body[data-fme-page="index"] .bn { height: 390px !important; min-height: 325px; }
}
@media (max-width: 820px) {
  html { scroll-padding-top: 70px; }
  body[data-fme-page="index"] .bn { height: 345px !important; min-height: 300px; }
  body[data-fme-page="index"] .aud { border-radius: 14px !important; }
  body.fme-publication .pg-hero { min-height: 230px !important; }
  body.fme-publication .pg-hero-txt { width: 100% !important; padding-inline: 21px !important; }
  body.fme-publication .pg-hero-img { width: 75% !important; opacity: .42; }
  body.fme-publication .body { padding-top: 26px !important; padding-bottom: 36px !important; gap: 25px !important; }
  body.fme-publication .body > main { flex-basis: 100% !important; }
  body.fme-publication .body > aside { flex-basis: 100% !important; }
  body.fme-publication .feats { grid-template-columns: 1fr !important; }
  body.fme-publication .tiles { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.fme-publication .side { max-width: 82vw !important; }
  body:is([data-fme-page="giang-vien"],[data-fme-page="minh-chung"],[data-fme-page="gop-y"]) main { padding: 20px 16px 45px !important; }
  body[data-fme-page="portal"] .sidebar { width: 264px; min-width: 264px; }
  body[data-fme-page="portal"] .workspace main { padding-inline: 16px; }
}
@media (max-width: 560px) {
  body[data-fme-page="index"] .bn { height: 340px !important; }
  body.fme-publication .tiles { grid-template-columns: 1fr !important; }
  body.fme-publication .pg-hero-txt h1 { font-size: 27px !important; }
  body[data-fme-page="minh-chung"] main ol { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-fme-page="minh-chung"] main ol li { min-width: 0; }
  body[data-fme-page="minh-chung"] main ol button { padding: 10px !important; gap: 7px !important; min-height: 82px; }
  body[data-fme-page="minh-chung"] main .g2 { grid-template-columns: 1fr !important; }
  body.fme-publication .banner > div:first-child { padding: 20px !important; }
  body[data-fme-page="portal"] .grid { grid-template-columns: 1fr !important; }
  body[data-fme-page="portal"] .topbar { padding: 12px 15px; }
  body[data-fme-page="portal"] .pagehead h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Detailed admin review is aligned with the original 4-step evidence/feedback screens. */
.fme-workflow-details { display: grid; grid-template-columns: 136px minmax(0,1fr); gap: 8px 16px; padding: 14px 16px; margin: 16px 0; background: #f4f8fb; border: 1px solid #dce8ef; border-radius: 11px; font-size: 13px; }
.fme-workflow-details dt { font-weight: 750; color: #58728a; }
.fme-workflow-details dd { margin: 0; color: #183a53; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 560px) { .fme-workflow-details { grid-template-columns: 1fr; gap: 4px; } .fme-workflow-details dt:not(:first-child) { margin-top: 9px; } }

body[data-fme-page="minh-chung"] main .drop { display: block; border-radius: 14px !important; background: #f3f8fb !important; color: #1e566f; transition: border-color .2s ease, background-color .2s ease; }
body[data-fme-page="minh-chung"] main .drop:hover, body[data-fme-page="minh-chung"] main .drop.fme-drop-active { background: #e4f3f7 !important; border-color: #258599 !important; }
body[data-fme-page="gop-y"] [data-fme-section]:hover, body[data-fme-page="gop-y"] [data-fme-section]:focus-visible { background: #fff1e3; border-radius: 6px; }

/* Approved CMS blocks are appended after the original customer demo layout. */
.fme-published-cms { max-width: 1180px; margin: 32px auto; padding: 28px; border: 1px solid #dfe8f2; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px #173e6510; }
.fme-published-cms h2 { font-size: 24px; color: #143b65; margin: 0 0 16px; }
.fme-published-cms h3 { color: #12355e; font-size: 19px; margin: 20px 0 8px; }
.fme-published-cms p { color: #314a62; line-height: 1.75; white-space: pre-wrap; }
.fme-cms-announcement { border-left: 4px solid #dc7840; background: #fff6ed; padding: 14px 18px; border-radius: 8px; }
@media (max-width: 768px) { .fme-published-cms { margin: 16px; padding: 20px; } }

/* AUDIT- — Empty state trang nhã cho danh sách trống (học bổng
    đề tài / lĩnh vực nghiên cứu): chỉ thông báo, không bịa dữ liệu mẫu. */
.fme-empty-state{text-align:center;padding:40px 20px;margin:8px 0 24px;background:#f7fafc;border:1px solid #e3e8ef;border-radius:12px;color:#505861}
.fme-empty-state .fme-empty-state-icon{display:block;font-size:32px;line-height:1;margin-bottom:12px;color:#8fa6bb}
.fme-empty-state p{margin:0;font-size:15px;line-height:1.6}
.fme-empty-state a{font-weight:700}
