
:root {
    --vlsi-primary: #1161a5; /* 主色：按鈕、連結、重點 */
    --vlsi-primary-dark: #0d4c81; /* 主色加深：漸層尾 */
    --vlsi-primary-light: #2783d0; /* 主色加亮：按鈕/連結 hover、focus */
    --vlsi-accent: #fbb239; /* 強調色：標籤、線條、點綴 */

    --vlsi-bg: #ffffff; /* 頁面背景 */
    --vlsi-surface: #f4f7fc; /* 區塊 / 卡片底色 */
    --vlsi-surface-2: #eaf0fa; /* 次級底色 */

    --vlsi-text: #444; /* 主要文字 */
    --bs-body-color: var(--vlsi-text); /* 覆寫 Bootstrap 內部變數，讓元件（card/list-group/dropdown 等）跟著統一 */
    --vlsi-text-muted: #5b6781; /* 次要文字 */
    --vlsi-border: #c9ced8; /* 框線 / 分隔 */

    --vlsi-header-bg: #ffffff; /* 導覽列背景 */
    --vlsi-footer-bg: #0a1430; /* footer 背景 */

    --vlsi-header-text: #0f1b33; /* 導覽列文字（選單 / Login，可後台調整） */
    --vlsi-footer-text: #aebbd6; /* footer 文字（可後台調整） */

    --vlsi-heading: #16181d; /* 區塊標題顏色（預設黑色，可後台單獨調整） */

    --vlsi-video-bg: #e7f0f8; /* 影片區塊背景（淺藍，可後台調整） */
    --vlsi-wrap: 1200px; /* 內容寬度，全站一致 */
    --vlsi-gut: clamp(16px, 4vw, 28px);
    --vlsi-radius: 10px;

    --vlsi-gray-800: #4d5969
}


h1, h2, h3, h4, .display {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--vlsi-heading);
}

.kicker {
    color: var(--vlsi-primary);
}

    .kicker::before {
        content: "";
        width: 26px;
        height: 2px;
        background: var(--vlsi-accent);
    }



*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    background: var(--vlsi-bg);
    color: var( --vlsi-text);
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main { flex: 1; display: flex; flex-direction: column; }
#main > .section--header-bg { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---- 內容容器：最大 1200，置中，響應式留白 ---- */
.wrap {
  width: 100%;
  max-width: var(--vlsi-wrap);
  margin-inline: auto;
  padding-inline: var(--vlsi-gut);
}

/* ---- 區塊節奏 ---- */
.section { padding-block: clamp(32px, 3vw, 96px); }
.section--tight { padding-block: clamp(28px, 2.3vw, 72px); }

/* ---- 區塊標題 ---- */
.sec-head { max-width: 720px; margin-bottom: 2rem; }
.sec-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin: .6rem 0 0; color: var(--vlsi-heading); }
.sec-head p { color: var(--vlsi-text-muted); margin: .9rem 0 0; font-size: 1.05rem; }
.sec-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; max-width: none; }

/* ---- 小標籤 / kicker ---- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---- 圖片佔位（交付給工程師：標示尺寸與用途） ---- */
.imgph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(128,128,128,.06) 0 12px, transparent 12px 24px),
    rgba(128,128,128,.10);
  color: rgba(128,128,128,.9);
  font-size: .8rem;
  letter-spacing: .04em;
}
.imgph span {
  padding: .4em .8em;
  border: 1px dashed currentColor;
  border-radius: 6px;
  background: rgba(255,255,255,.35);
  backdrop-filter: blur(2px);
}
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-21x9 { aspect-ratio: 21 / 9; }
.ratio-4x3  { aspect-ratio: 4 / 3; }
.ratio-1x1  { aspect-ratio: 1 / 1; }

/* ---- 桌機：主選單滑入展開子選單 ---- */
@media (min-width: 992px) {
  .nav-hover .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
  .nav-hover .dropdown-menu { margin-top: .25rem; }
}

/* ---- 手機（<576px）：Login / Contact 移到 Menu 列最右側 ---- */
.nav-actions { display: none; align-items: center; gap: .6rem; margin-left: auto; }
.nav-actions .btn { padding: .4rem 1.1rem; }
@media (max-width: 575px){
  .header-top .header-actions { display: none; }
  .nav-actions { display: flex; }
  .header-top .wrap { justify-content: center !important; }
}

/* ---- 確保 fade 輪播作用中的 slide 一定可見（避免轉場卡在 opacity:0） ---- */
.carousel-fade .carousel-item { transition: none !important; }
.carousel-fade .carousel-item.active { opacity: 1 !important; }
.carousel-fade .carousel-item:not(.active) { opacity: 0 !important; }

/* ---- offcanvas 即時開啟（避免 transform 轉場卡住） ---- */
.offcanvas { transition: none !important; }

/* ---- 贊助 Logo 圖片：白底磚塊內等比縮放 ---- */
.logo-cell img { max-width: 80%; max-height: 48px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 575px){ .logo-cell img { max-height: 40px; } }

/* ---- YouTube 嵌入（16:9 響應式） ---- */
.yt-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* 影片縮圖用圖片填滿其比例容器 */
img.ratio-16x9, img.ratio-1x1, img.ratio-4x3, img.ratio-21x9 { width: 100%; object-fit: cover; }

/* ---- 螢幕閱讀器用 ---- */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
}

/* ---- 跳到主內容 ---- */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  padding: 10px 16px; border-radius: 8px; z-index: 2000;
  background: #111; color: #fff; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ============================================================
   站台共用 chrome（header / 主選單 / footer / 回到頂部）— 由 home.css 移入
   ============================================================ */

/* ---- Bootstrap 按鈕覆寫 ---- */
.btn {
  border-radius: 999px;
  font-weight: 600;
  padding: .45rem 1.25rem;
  font-size: 1rem;
}
.btn-primary {
  background-color: var(--vlsi-primary);
  border-color: var(--vlsi-primary);
  color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--vlsi-primary-light);
  --bs-btn-active-border-color: var(--vlsi-primary-light);
}
.btn-primary:hover {
  background-color: var(--vlsi-primary-light);
  border-color: var(--vlsi-primary-light);
  color: #fff;
}
.btn-primary:focus {
  background-color: var(--vlsi-primary);
  border-color: var(--vlsi-primary);
  color: #fff;
}
.btn-primary:active,
.btn-primary.active, .show > .btn-primary.dropdown-toggle {
  background-color: var(--vlsi-primary-light);
  border-color: var(--vlsi-primary-light);
  color: #fff;
}
.btn-outline-primary {
  color: var(--vlsi-primary);
  border-color: var(--vlsi-primary);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--vlsi-primary);
  --bs-btn-active-border-color: var(--vlsi-primary);
}
.btn-outline-primary:hover {
  background-color: var(--vlsi-primary);
  border-color: var(--vlsi-primary);
  color: #fff;
}
.btn-outline-primary:focus {
  background-color: transparent;
  border-color: var(--vlsi-primary);
  color: var(--vlsi-primary);
}
.btn-outline-primary:active,
.btn-outline-primary.active, .show > .btn-outline-primary.dropdown-toggle {
  background-color: var(--vlsi-primary);
  border-color: var(--vlsi-primary);
  color: #fff;
}

/* ---- 固定寬度按鈕（共用） ---- */
.btn-w-300 { width: 300px; }

/* ---- 表單標籤 ---- */
.col-form-label { font-weight: 700; }

/* ---- 基本文字連結 ---- */
.text-link { color: var(--vlsi-text); text-decoration: underline; }
.text-link:hover, .text-link:focus { color: var(--vlsi-primary-light); }



/* ---- 頂部資訊列 ---- */
.topbar {
  background: var(--vlsi-text); color: #cfd8ea;
  font-size: .82rem;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center;
  min-height: 40px; gap: 1rem; flex-wrap: wrap; white-space: nowrap; }
.topbar a { color: #cfd8ea; }
.topbar a:hover { color: #fff; }
.topbar .links { display: flex; gap: 1.25rem; align-items: center; }
.topbar .lang { display: flex; gap: .35rem; align-items: center; }
.topbar .lang a.is-on { color: #fff; font-weight: 600; }

/* ---- 導覽列 / Logo（兩列式：Logo+動作 / 主選單；兩列為 body 直接子層） ---- */
.header-top .wrap, .header-nav .wrap { max-width: 1340px; }

/* 第一列（隨頁面捲動離開） */
.header-top { background: var(--vlsi-header-bg); border-bottom: 1px solid var(--vlsi-border); }
.header-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; }
.brand img { height: auto; max-height: 46px; max-width: 100%; width: auto; display: block; }
.header-actions { display: flex; align-items: center; gap: 1rem; flex: 0 0 auto; }
.hdr-link { font-weight: 600; font-size: 1rem; color: var(--vlsi-primary);
  display: inline-flex; align-items: center; padding: 3px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--vlsi-primary); transition: background .18s, color .18s, transform .18s, box-shadow .18s; }
.hdr-link:hover { color: #fff; background: var(--vlsi-primary); transform: translateY(-2px);
  box-shadow: 0 10px 26px -12px var(--vlsi-primary); }

/* 登入後 Welcome 選單按鈕：無外框，黑色文字，hover 只加深文字色 */
#hdr-user-area > .dropdown-toggle,
#nav-user-area > .dropdown-toggle {
  background-color: transparent;
  border-color: transparent;
  color: var(--vlsi-heading);
}
#hdr-user-area > .dropdown-toggle:hover,
#hdr-user-area > .dropdown-toggle:focus,
#nav-user-area > .dropdown-toggle:hover,
#nav-user-area > .dropdown-toggle:focus {
  background-color: transparent;
  border-color: transparent;
  color: var(--vlsi-primary-light);
}
#hdr-user-area > .dropdown-toggle:active,
#hdr-user-area.show > .dropdown-toggle,
#nav-user-area > .dropdown-toggle:active,
#nav-user-area.show > .dropdown-toggle {
  background-color: transparent;
  border-color: transparent;
  color: var(--vlsi-primary-dark);
}

/* 第二列：主選單（捲動時置頂） */
.header-actions .dropdown-menu, .nav-actions .dropdown-menu { z-index: 1035; }
.header-nav { position: sticky; top: 0; z-index: 1030; background: var(--vlsi-header-bg); border-bottom: 1px solid var(--vlsi-border); transition: box-shadow .25s ease; }
.header-nav.is-stuck { box-shadow: 0 8px 24px -10px rgba(15,27,51,.28); }
.navbar { padding: 0; }
.main-nav { gap: 0; margin-inline: auto; }
.main-nav .nav-link {
  font-weight: 600; color: var(--vlsi-header-text); padding: 1.05rem .85rem !important;
  position: relative; font-size: 14px; white-space: nowrap;
}
@media (min-width: 992px) and (max-width: 1199px){
  .main-nav .nav-link { padding: 1.05rem .55rem !important; font-size: 14px; }
}
@media (min-width: 992px) and (max-width: 1099px){
  .main-nav .nav-link { padding: 1.05rem .38rem !important; font-size: 13.5px; }
}
.main-nav .nav-link:hover, .main-nav .nav-link.show { color: var(--vlsi-primary); }
.main-nav .nav-link::before {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: 0; height: 3px;
  background: var(--vlsi-primary); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.main-nav .nav-link:hover::before, .main-nav .nav-item.show .nav-link::before { transform: scaleX(1); }
.main-nav .dropdown-toggle::after {
  content: ""; display: inline-block; width: .46em; height: .46em; margin-left: .5em;
  border: 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); vertical-align: middle; opacity: .7; transition: transform .2s;
}
.main-nav .nav-item.show .dropdown-toggle::after { transform: translateY(1px) rotate(225deg); }
.dropdown-menu {
  border: 1px solid var(--vlsi-border); border-radius: 12px; padding: .5rem;
  box-shadow: 0 24px 50px -24px rgba(15,27,51,.4); min-width: 256px;
  border-bottom: 3px solid var(--vlsi-primary);
}
.dropdown-item {
  border-radius: 8px; padding: .58rem .8rem; font-size: .92rem; color: var(--vlsi-text);
  font-weight: 500;
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--vlsi-surface); color: var(--vlsi-primary); }
.dropdown-item.active, .dropdown-item:active { background: var(--vlsi-gray-800); color: #fff; }
/* 漢堡鈕 */
.navbar-toggler { display: flex; align-items: center; gap: .5rem; padding: .7rem 0; box-shadow: none; }
.navbar-toggler .menu-label { font-weight: 600; font-size: .92rem; color: var(--vlsi-header-text); }
@media (max-width: 991px){
  .header-nav .wrap { padding-block: .2rem; }
  .main-nav .nav-link { padding: .8rem .2rem !important; }
  .main-nav .nav-link::after { display: none; }
  .main-nav .nav-link::before { left: .2rem; right: .2rem; }
  /* 手機子選單：分隔線對齊主選單文字左緣，文字縮排 */
  .dropdown-menu {
    box-shadow: none; border: 0; border-radius: 0; border-bottom: 0;
    padding: 0; margin: 0 0 .4rem .2rem;
  }
  .dropdown-item {
    border-radius: 0; padding: .85rem .2rem .85rem 1.4rem; font-size: .95rem;
    border-bottom: 1px solid var(--vlsi-border);
  }
  .dropdown-item:last-child { border-bottom: 1px solid var(--vlsi-border); }
  .dropdown-item:hover, .dropdown-item:focus { background: transparent; color: var(--vlsi-primary); }
  /* 手機展開選單：限制高度並可捲動，避免下方項目被裁切 */
  .header-nav .navbar-collapse {
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}
@media (max-width: 575px){
  .header-top .wrap { min-height: 64px; gap: .6rem; }
  .brand img { max-height: 34px; }
  .header-actions { gap: .5rem; }
  .header-actions .btn, .nav-actions .btn { padding: 4px 16px; font-size: .86rem; }
}
@media (max-width: 360px){
  .brand img { max-height: 30px; }
}


/* ---- Footer ---- */
.site-footer { background: var(--vlsi-footer-bg); color: var(--vlsi-footer-text); padding-block: 3rem; }
.site-footer a { color: var(--vlsi-footer-text); }
.site-footer a:hover { color: #fff; }
.footer-editor { font-size: .95rem; line-height: 1.7; color: var(--vlsi-footer-text); }
.footer-editor p { margin: 0 0 .8rem; }
.footer-editor p:last-child { margin-bottom: 0; }
.footer-editor p:first-child { color: var(--vlsi-footer-text); font-weight: 600; filter: brightness(1.5); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; }
@media (max-width: 767px){ .footer-grid { grid-template-columns: 1fr 1fr;} }
@media (max-width: 480px){ .footer-grid { grid-template-columns: 1fr;} }
.site-footer .f-brand b { color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; font-size: 1.2rem; display: block; }
.site-footer h5 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 1rem; }
.site-footer ul.flinks li { margin-bottom: .55rem; font-size: .92rem; }
.footer-orgs { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.footer-orgs .imgph { width: 110px; aspect-ratio: 5/2; border-radius: 6px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.6rem; padding-block: 1.4rem; font-size: .85rem; color: #8190b0; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }



/* ---------- 做法 B：選單項目超過寬度時文字折行（桌機） ---------- */
@media (min-width: 992px){
  .header-nav .navbar-collapse { min-width: 0; }
  .main-nav { flex-wrap: nowrap; align-items: center; min-width: 0; }
  .main-nav .nav-link {
    display: flex; flex-direction: row; align-items: center; justify-content: center;
    white-space: normal;           /* 允許折行 */
    text-align: center;
    line-height: 1.25;
    overflow-wrap: break-word;
  }
  /* 下拉箭頭固定在文字右側、垂直置中、不換行 */
  .main-nav .dropdown-toggle::after { flex: 0 0 auto; align-self: center; }
  /* 折行項目底線維持貼齊底部 */
  .main-nav .nav-link::before { left: .5rem; right: .5rem; }
}


/* ---- scope-row list（light theme，供 Submission Index 等頁面使用） ---- */
.scope-list { border-top: 1px solid var(--vlsi-border); }
.scope-row {
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
  padding: .875rem 1.5rem; border-bottom: 1px solid var(--vlsi-border);
  position: relative; text-decoration: none; color: inherit;
  transition: background .18s, padding-left .18s;
}
.scope-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--vlsi-primary); transform: scaleY(0); transition: transform .18s;
}
.scope-row:hover { background: rgba(0,0,0,.03); padding-left: 1.75rem; color: inherit; }
.scope-row:hover::before { transform: scaleY(1); }
.sr-act { display: inline-flex; align-items: center; gap: .5rem; color: var(--vlsi-border); flex-shrink: 0; transition: color .18s; }
.scope-row:hover .sr-act { color: var(--vlsi-primary); }
.sr-ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid currentColor; transition: background .18s, border-color .18s, color .18s; }
.scope-row:hover .sr-ico { background: var(--vlsi-primary); border-color: var(--vlsi-primary); color: #fff; }
.sr-label { font-size: .8rem; font-weight: 600; letter-spacing: .04em; }

/* ---------- 回到頂部按鈕（共用） ---------- */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  z-index: 1040; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: #fff; color: var(--vlsi-heading); border: 1px solid var(--vlsi-border);
  box-shadow: 0 8px 24px -8px rgba(15,27,51,.35);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s, color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--vlsi-primary); color: #fff; border-color: var(--vlsi-primary); }
.to-top svg { width: 22px; height: 22px; }

/* ============================================================
   Rich-text editor content isolation
   ============================================================ */
.rich-text ul,
.rich-text ol { list-style: revert; padding: revert; margin: revert; }
.rich-text li { list-style: revert; }
.rich-text h1, .rich-text h2, .rich-text h3,
.rich-text h4, .rich-text h5, .rich-text h6 { font-size: revert; font-weight: revert; margin: revert; }
.rich-text p { margin: revert; }
.rich-text a { color: revert; text-decoration: revert; }
.rich-text strong, .rich-text b { font-weight: bold; }
.rich-text em, .rich-text i { font-style: italic; }
.rich-text table { border-collapse: collapse; width: 100%; }
.rich-text table th,
.rich-text table td { border: 1px solid #dee2e6; padding: 0.5rem 0.75rem; }
.rich-text img { max-width: 100%; height: auto; }
.rich-text { overflow-wrap: break-word; }



/* ---- 內頁標題橫幅（選單標題） ---- */
.page-hero {
  position: relative; overflow: hidden;
  background: var(--vlsi-primary) url("../img/page-hero.jpg") center / cover no-repeat;
  height: clamp(88px, 18vw, 150px);
  padding-top: 0; padding-bottom: 0;
  display: flex; align-items: center;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: rgba(0,0,0,.45);
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 {
  margin: 0; text-align: center; color: #fff;
  font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1;
}

/* ---- 麵包屑導覽列 ---- */
.breadcrumb-bar { background: var(--vlsi-surface);  }
.breadcrumb-list {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  list-style: none; margin: 0; padding: .9rem 0;
  font-size: 14px; color: var(--vlsi-text-muted);
}
.breadcrumb-list li { display: flex; align-items: center; gap: .5rem; }
.breadcrumb-list li + li::before { content: "/"; color: var(--vlsi-border); }
.breadcrumb-list a { color: var(--vlsi-primary); text-decoration: none; }
.breadcrumb-list a:hover { text-decoration: underline; }
.breadcrumb-list li[aria-current] { color: var(--vlsi-text); font-weight: 600; }


/* ============================================================
   VLSI-TSA 內頁 — 右側項目卡片（sub-card）
   ============================================================ */

.sub-list { display: flex; flex-direction: column; gap: 16px; }
.sub-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: .5rem 1rem;
  background: #24365c;
  background-image:
    radial-gradient(circle at 88% 22%, rgba(255, 255, 255, .09) 0 42px, transparent 43px),
    radial-gradient(circle at 74% 78%, rgba(255, 255, 255, .06) 0 60px, transparent 61px),
    radial-gradient(circle at 96% 90%, rgba(255, 255, 255, .05) 0 34px, transparent 35px),
    linear-gradient(120deg, #3f5a94 0%, #1b4c79 55%, #112c63 100%);
  border-radius: 14px; padding: 1.4rem 1.6rem;
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(255,255,255,.1);
  text-decoration: none; color: #fff;
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.sub-card:hover { transform: translateY(-3px); background-color: #2c4067; box-shadow: 0 20px 40px -24px rgba(15,27,51,.7); }
.sub-card__title, .sub-card__date { position: relative; z-index: 1; }
.sub-card__title {
  font-size: 20px; font-weight: 700; line-height: 1.3;
  background: linear-gradient(90deg, #ffffff 0%, #fcff9e 60%, #eb751c 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.sub-card__date { grid-column: 1 / -1; font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace; font-size: 14px; color: rgba(255, 255, 255, .8); }
.sub-card__go {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  border: 1px solid rgba(255,255,255,.35); transition: background .2s, border-color .2s, transform .2s;
}
.sub-card__go svg { width: 20px; height: 20px; }
.sub-card:hover .sub-card__go { background: var(--vlsi-primary); border-color: var(--vlsi-primary); transform: translateX(2px); }

/* ============================================================
   前台 input 共用樣式（vlsi-front scope）
   ============================================================ */
.vlsi-front .form-control,
.vlsi-front .form-select {
  height: 48px; padding: 0 1rem; font-size: 16px;
  border: 1px solid var(--vlsi-border); border-radius: 8px; background-color: #fff; color: var(--vlsi-text);
  transition: border-color .18s, box-shadow .18s;
}
.vlsi-front .form-select { padding-right: 2.5rem; }
.vlsi-front .form-control::placeholder { color: #9aa4b5; }
.vlsi-front .form-control:focus,
.vlsi-front .form-select:focus { outline: 0; border-color: var(--vlsi-primary); box-shadow: 0 0 0 3px rgba(17,97,165,.15); }

/* ============================================================
   表單驗證
   ============================================================ */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 90%;
    color: #e63757;
}
.invalid .invalid-feedback {
    display: block;
}
.invalid .form-control,
.invalid .form-select,
.invalid .form-check-input {
    border-color: #e63757;
}



/* ---- 必填欄位標記 ---- */
.required::after {
    content: "*";
    color: #e63757;
    padding-right: 0.1rem;
    position: relative;
}


/* ---- 驗證碼 ---- */
.ValidateCode { display: flex; align-items: center; }
.imgCheckCode { margin: 0 0.5rem; }
.refresh { color: #666; cursor: pointer; }

/* ---- Loading overlay ---- */
.loaderWrapper {
    position: fixed; top: 0; left: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,.5); flex-direction: column;
}
.loaderWrapper span { color: #fff; margin-top: 2rem; font-size: 1.5rem; font-weight: 800; }
.loader {
    color: #fff; font-size: 45px; text-indent: -9999em; overflow: hidden;
    width: 1em; height: 1em; border-radius: 50%; position: relative;
    transform: translateZ(0);
    animation: mltShdSpin 1.7s infinite ease, round 1.7s infinite ease;
}
@keyframes mltShdSpin {
    0%, 5%, 95% { box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; }
    10%, 59% { box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em; }
    20% { box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em; }
    38% { box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em; }
    100% { box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; }
}
@keyframes round {
    0%   { transform: rotate(0deg) }
    100% { transform: rotate(360deg) }
}

/* ---- Bootstrap .card 全站統一視覺樣式 ---- */
.card {
  background: #fff;
  border: 1px solid var(--vlsi-border);
  border-radius: 16px;
  box-shadow: 0 24px 60px -34px rgba(15,27,51,.35);
  overflow:hidden;
}
.card-body{padding:2rem;}
/* ---- Comment Modal ---- */
.comment-modal .input-score {
    width: 12%;
}

@media (max-width: 992px) {
    .comment-modal .modal-dialog  { width: 100%; }
    .comment-modal .input-score   { min-width: 90px; }
    .comment-modal .input-comment { min-width: 200px; }
}

/* ---- .max-vh-80（table 容器用）已停用 ----
   DataTables 已用 scrollY 自己控制表身捲動範圍（見 dataTableUtil.js），這個 class 不能再設 max-height：
   同一個元素只要 overflow-x 是 auto（.table-responsive 就是），瀏覽器規範會強制 overflow-y 也變成 auto，
   一旦設了 max-height，內層高度估算稍有誤差就會多疊一層外層捲軸，把頁碼捲出視窗。
   刻意不移除 .cshtml 裡的 class（42 個頁面共用同一個 markup），讓它保留但不吃任何樣式，
   實際垂直高度完全交給 DataTables 的 scrollY 控制。 */

/* ---- Bootstrap table：深色 thead（對齊後台 theme 樣式） ---- */
/* 用 CSS variable 覆寫，確保蓋過 Bootstrap 的 --bs-table-bg: transparent */
.table > thead { --bs-table-bg: #4d5969; --bs-table-color: #fff; }
.table > thead th, .table > thead td { color: #fff; }

/* ---- Table 首末欄內距 / th 粗體 ---- */
.table tfoot > tr > th:first-child,
.table thead > tr > th:first-child,
.table tr th:first-child,
.table tr td:first-child { padding-left: 1.25rem; }
.table tfoot > tr > th:last-child,
.table thead > tr > th:last-child,
.table tr th:last-child,
.table tr td:last-child { padding-right: 1.25rem; }
th { font-weight: 600; }

/* ---- nowrap utility（DataTable 欄位用） ---- */
.nowrap { white-space: nowrap; }

/* ============================================================
   DataTables 2.x 品牌色 override
   （datatables.min.css 在 _Layout 全域載入，此區塊必須在其後）
   ============================================================ */
table.dataTable { margin: 0 !important; border-color: var(--vlsi-border) !important; }

/* 隱藏空的 top toolbar row（searching/info/lengthChange 全關時 DataTables 仍生成空容器） */
div.dt-container > .dt-layout-row:first-child:not(.dt-layout-table) { display: none; }

/* 分頁按鈕：圓形，active 深色實心、hover 淺灰實心，整組置中 */
div.dt-container .dt-paging .dt-paging-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2em;
  height: 2em;
  min-width: 2em;
  padding: 0 !important;
  border-radius: 50%;
}
div.dt-container .dt-paging .dt-paging-button:hover {
  background: var(--vlsi-border) !important;
  background-color: var(--vlsi-border) !important;
  border-color: transparent !important;
  color: var(--vlsi-text) !important;
}
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
  background: var(--vlsi-heading) !important;
  background-color: var(--vlsi-heading) !important;
  border-color: transparent !important;
  color: #fff !important;
}
div.dt-container .dt-layout-row:has(.dt-paging) {
  justify-content: center !important;
  margin-top: 40px !important;
}
div.dt-container .dt-layout-cell:has(.dt-paging) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
div.dt-container div.dt-layout-row{margin-top:0;}


/*=============================
modal
==============================*/
.modal-header {
    background-color: var(--vlsi-gray-800);
}

.modal-title {
    color: #fff;
}

.modal-header .btn-close {
    padding: 0.8rem;
    border: 0;
    box-shadow: none;
    background-color: #fff;
    border-radius: 50%;
    opacity: 1;
}

.modal-header .btn-close:hover {
    background-color: #d8e2ef;
}

.modal-header button.btn-circle {
    width: 1rem;
    height: 1rem;
}



/* ---- 提示 Modal ---- */
.modal-alert .modal-body { text-align: center; padding: 1.5rem; }
.modal-alert .alert-icon {
    font-size: 60px; font-weight: 100; margin: 0 0 2rem;
    border-radius: 50%; height: 100px; width: 100px;
    border: 5px #f5803e solid; padding: 1rem;
}
.modal-alert .fa-check      { color: #00d27a; border-color: #00d27a; }
.modal-alert .fa-times      { color: #e63757; border-color: #e63757; }
.modal-alert .fa-exclamation{ color: #f5803e; border-color: #f5803e; }
.modal-alert h4  { font-weight: 800; margin-bottom: 1rem; }
.modal-alert #btn_alertConfirm { width: 100px; }
