/********************************************************/
/* modern.css — UI 現代化覆蓋層（在 style.css 之後載入）   */
/* 設計系統：Noto Sans TC + 現代教育配色                    */
/********************************************************/

:root{
  --primary:#4F46E5;        /* indigo */
  --primary-dark:#3730A3;
  --teal:#14B8A6;
  --amber:#F59E0B;
  --ink:#1E293B;            /* 主文字 */
  --ink-soft:#475569;
  --bg-soft:#F1F5F9;        /* 內容底色 */
  --card:#FFFFFF;
  --radius:14px;
  --shadow-sm:0 1px 3px rgba(15,23,42,.08),0 1px 2px rgba(15,23,42,.06);
  --shadow-md:0 6px 18px rgba(15,23,42,.10);
  --shadow-lg:0 14px 34px rgba(15,23,42,.16);
  --font-main:'Noto Sans TC','Microsoft JhengHei','PingFang TC','Heiti TC',sans-serif;
}

/* ---------- 全域字體與基調 ---------- */
html,body,
.topMenuBar,.main,.normalUserSchoolName,.normalUserProgramName,
.normalUserUsername,.normalUserPassword,.normalUserSubmitInput,
.mainCurrentPermissionGroupSubmitInput{
  font-family:var(--font-main);
}
body{
  color:var(--ink);
  min-width:0;                 /* 解除 style.css 的 min-width:1500px 鎖定，讓版面隨瀏覽器縮放 */
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
::selection{ background:#C7D2FE; color:#1E1B4B; }

/* 美化捲軸 */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:#EEF2F7; }
::-webkit-scrollbar-thumb{ background:#C3CBD9; border-radius:6px; }
::-webkit-scrollbar-thumb:hover{ background:#9AA6BB; }

/* ---------- 通用表單元件（只加外觀，不動顏色語意） ---------- */
input,select,textarea{ transition:border-color .15s ease, box-shadow .15s ease; }
input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:none;
  border-color:var(--primary) !important;
  box-shadow:0 0 0 3px rgba(79,70,229,.18);
}
input[type="submit"],input[type="button"],button{
  cursor:pointer;
  transition:transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}
input[type="submit"]:active,input[type="button"]:active,button:active{
  transform:translateY(1px);
}

/********************************************************/
/* 登入頁                                                 */
/********************************************************/
.normalUserBody{
  background:linear-gradient(135deg,#1E3A8A 0%,#4F46E5 45%,#14B8A6 100%) fixed;
  position:relative;
}
/* 插畫（右下）與圖紋覆蓋 */
.normalUserBody::before{
  content:"";
  position:fixed;
  right:1vw;
  bottom:0;
  width:min(34vw,520px);
  height:min(48vh,420px);
  background:url('/img/ui/login-hero.svg') no-repeat right bottom / contain;
  pointer-events:none;
  opacity:.9;
}
/* 視窗較窄時隱藏插畫，避免遮蓋置中的登入表單 */
@media (max-width:1400px){
  .normalUserBody::before{ display:none; }
}
.normalUserBody::after{
  content:"";
  position:fixed;
  inset:0;
  background:url('/img/ui/pattern-shapes.svg') repeat;
  opacity:.5;
  pointer-events:none;
}
.normalUserBody > *{ position:relative; z-index:1; }

.normalUserSchoolName{
  padding-top:56px;
  font-size:clamp(20px,3.2vw,30px);
  font-weight:500;
  letter-spacing:clamp(2px,.7vw,6px);
  padding-left:12px;
  padding-right:12px;
  text-shadow:0 2px 10px rgba(15,23,42,.35);
}
.normalUserProgramName{
  padding-top:14px;
  font-size:clamp(30px,5.5vw,52px);
  font-weight:900;
  letter-spacing:clamp(1px,.5vw,4px);
  padding-left:12px;
  padding-right:12px;
  text-shadow:0 4px 18px rgba(15,23,42,.4);
}

/* 校徽圓圈 → 懸浮白環卡片感 */
.circleContainer{
  width:220px;
  height:220px;
  border:8px solid rgba(255,255,255,.92);
  box-shadow:var(--shadow-lg), 0 0 0 10px rgba(255,255,255,.15);
  background:#fff;
  transition:transform .25s ease;
}
.circleContainer:hover{ transform:scale(1.03) rotate(-1deg); }

/* 登入表單輸入（保持原設計的水平尺寸：label 24px、icon 36px、
   input 總寬 266px、按鈕 266px，配合 style.css 的 padding-left:170px 對齊） */
.normalUserUsername,.normalUserPassword{ font-size:24px; font-weight:500; text-shadow:0 1px 6px rgba(15,23,42,.35); }
.normalUserUserIcon,.normalUserPasswordIcon{ font-size:36px; }
.normalUserUsernameInput,.normalUserPasswordInput{
  height:46px;
  width:234px;               /* 234 + 左右 16px padding = 266px 總寬 */
  border-radius:999px;
  padding:0 16px;
  font-size:17px;
  background-color:rgba(255,255,255,.95);
  box-shadow:var(--shadow-sm);
  color:var(--ink);
}
.normalUserUsernameInput:focus,.normalUserPasswordInput:focus{
  background-color:#fff;
  box-shadow:0 0 0 4px rgba(20,184,166,.35), var(--shadow-md);
}

/* 登入按鈕（寬度與輸入框總寬一致，配合 170px 偏移對齊） */
.normalUserSubmitInput{
  width:266px;
  height:48px;
  border-radius:999px;
  font-size:20px;
  font-weight:700;
  letter-spacing:2px;
  color:var(--primary-dark);
  background:#fff;
  box-shadow:var(--shadow-md);
}
.normalUserSubmitInput:hover{
  background:#EEF2FF;
  transform:translateY(-2px);
  box-shadow:var(--shadow-lg);
}

/* 錯誤訊息 */
.failLogin{ height:28px; }
.failLoginMessage{
  display:inline-block;
  padding:4px 18px;
  border-radius:999px;
  background:rgba(190,18,60,.28);
  color:#FFE4E6;
  font-weight:500;
}

/********************************************************/
/* 登入頁 v2：亮彩雙欄卡片（左品牌插畫 + 右登入表單）        */
/********************************************************/
.loginBody{
  background:linear-gradient(135deg,#6366F1 0%,#8B5CF6 48%,#EC4899 100%) fixed;
  min-height:100vh;
}
.loginBody::before{ display:none; }   /* 隱藏舊版右下角插畫 */
.loginBody::after{
  background:url('/img/ui/pattern-bright.svg') repeat;
  opacity:.3;
}

.loginWrap{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding:32px 20px;
  box-sizing:border-box;
}
.loginCard{
  display:flex;
  width:min(920px,100%);
  border-radius:28px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 30px 80px -20px rgba(30,27,75,.55);
}

/* 左欄：品牌與插畫 */
.loginArt{
  flex:1.05;
  background:linear-gradient(160deg,#4F46E5 0%,#8B5CF6 55%,#EC4899 100%);
  color:#fff;
  padding:44px 40px 34px;
  position:relative;
  overflow:hidden;
}
.loginArt::before{
  content:"";
  position:absolute;
  inset:0;
  background:url('/img/ui/pattern-bright.svg') repeat;
  opacity:.22;
  pointer-events:none;
}
.loginArt > *{ position:relative; }
.loginArtSchool{ font-size:15px; letter-spacing:3px; font-weight:500; opacity:.92; }
.loginArtProgram{
  margin-top:10px;
  font-size:clamp(26px,3vw,34px);
  font-weight:900;
  letter-spacing:2px;
  text-shadow:0 3px 14px rgba(30,27,75,.35);
}
.loginArtDesc{
  margin-top:12px;
  font-size:14px;
  font-weight:300;
  line-height:1.8;
  opacity:.9;
  max-width:420px;
}
.loginArtImg{
  margin:24px auto 6px;
  width:100%;
  max-width:340px;
  height:190px;
  background:url('/img/ui/banner-school.svg') no-repeat center / contain;
}
.loginChips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
.loginChip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.38);
  font-size:13px;
  font-weight:500;
}

/* 右欄：登入表單 */
.loginForm{
  flex:1;
  padding:44px 42px 36px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.loginLogo{
  width:88px;
  height:88px;
  margin:0 auto;
  border-radius:24px;
  background:#fff;
  border:6px solid #EEF2FF;
  box-shadow:0 10px 24px -8px rgba(79,70,229,.35);
  overflow:hidden;
}
.loginLogo img{ width:100%; height:100%; object-fit:contain; }
.loginWelcome{ margin-top:16px; text-align:center; font-size:24px; font-weight:900; color:var(--ink); }
.loginSub{ margin:4px 0 8px; text-align:center; font-size:14px; color:var(--ink-soft); }

.loginLabel{ display:block; margin:14px 0 6px; font-size:13.5px; font-weight:700; color:var(--ink-soft); }
.loginField{
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 14px;
  border:2px solid #E5E8EE;
  border-radius:14px;
  background:#F8FAFF;
  transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.loginField i{ color:#8B93A7; font-size:16px; }
.loginField input{
  flex:1;
  height:46px;
  min-width:0;
  border:none;
  background:transparent;
  font-size:16px;
  color:var(--ink);
  outline:none;
  box-shadow:none;
}
.loginField input:focus-visible{ border:none; box-shadow:none; }
.loginField:focus-within{
  border-color:#6366F1;
  background:#fff;
  box-shadow:0 0 0 4px rgba(99,102,241,.15);
}
.loginField:focus-within i{ color:#6366F1; }

.loginError{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
  padding:9px 14px;
  border-radius:12px;
  background:#FEF2F2;
  border:1px solid #FECACA;
  color:#B91C1C;
  font-size:13.5px;
  font-weight:500;
}

.loginBtn{
  width:100%;
  height:48px;
  margin-top:22px;
  border:none;
  border-radius:14px;
  font-size:17px;
  font-weight:700;
  letter-spacing:3px;
  color:#fff;
  background:linear-gradient(135deg,#6366F1,#8B5CF6);
  box-shadow:0 12px 24px -8px rgba(99,102,241,.5);
}
.loginBtn:hover{ transform:translateY(-2px); box-shadow:0 16px 30px -8px rgba(99,102,241,.55); }
.loginOr{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:16px;
  color:#A0A7B8;
  font-size:12.5px;
}
.loginOr::before,.loginOr::after{ content:""; flex:1; height:1px; background:#E5E8EE; }
.loginBtnGoogle{
  margin-top:14px;
  background:#fff;
  color:var(--ink);
  border:2px solid #E5E8EE;
  box-shadow:var(--shadow-sm);
  letter-spacing:1px;
}
.loginBtnGoogle:hover{ background:#F8FAFF; box-shadow:var(--shadow-md); }

.loginFoot{
  color:rgba(255,255,255,.85);
  font-size:12.5px;
  letter-spacing:1px;
  text-shadow:0 1px 6px rgba(30,27,75,.3);
}

/* 窄螢幕：改為單欄直排 */
@media (max-width:860px){
  .loginCard{ flex-direction:column; width:min(440px,100%); }
  .loginArt{ padding:30px 28px 22px; }
  .loginArtImg{ max-width:260px; height:120px; margin-top:14px; }
  .loginChips{ margin-top:14px; }
  .loginForm{ padding:28px 26px 28px; }
}

/********************************************************/
/* 登入後：頂部導覽（響應式 flex 版）                        */
/********************************************************/
.shadowBar{
  padding-bottom:26px;
  background:linear-gradient(180deg,#FFFFFF 0%,#F8FAFF 100%);
  border-bottom:1px solid #E6EAF3;
  box-shadow:0 4px 18px rgba(15,23,42,.06);
}
.topMenuBar{ padding-top:18px; font-size:17px; color:var(--ink); }

/* 校徽 + 權限組別列 */
.topBarRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  padding-bottom:14px;
}
.topBarLogo{ min-width:0; display:flex; align-items:center; gap:12px; }
.topBarLogo .topBarLogoImg{ display:block; width:52px; height:52px; object-fit:contain; border-radius:14px; flex:none; }
.topBarName{ min-width:0; line-height:1.25; }
.topBarNameZh{ font-size:19px; font-weight:900; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topBarNameEn{ font-size:12px; font-weight:500; color:var(--ink-soft); letter-spacing:.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topBarPermission{ margin-left:auto; text-align:right; }

/* 12 格功能選單：寬螢幕每行 6 格，窄螢幕自動換行 */
.topMenuGrid{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
.topMenuGrid .topMenuCell{
  flex:1 1 150px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:50px;
  padding:8px 6px;
  text-align:center;
  cursor:pointer;
  user-select:none;
}

.topMenuCell{
  border:none;
  border-radius:12px;
  background:var(--card);
  box-shadow:var(--shadow-sm);
  font-weight:500;
  color:var(--ink-soft);
  transition:transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.topMenuCell i{ margin-right:6px; }
.topMenuCell:hover{
  background:#EEF2FF;
  color:var(--primary-dark);
  transform:translateY(-3px);
  box-shadow:var(--shadow-md);
  cursor:pointer;
}

/* 各模組選取色（現代化） */
.topMenuCellMainSelected        { color:#fff !important; background-color:#64748B !important; box-shadow:0 6px 16px rgba(100,116,139,.4); }
.topMenuCellStudentSelected     { color:#fff !important; background-color:#3B82F6 !important; box-shadow:0 6px 16px rgba(59,130,246,.4); }
.topMenuCellAttendSelected      { color:#fff !important; background-color:#10B981 !important; box-shadow:0 6px 16px rgba(16,185,129,.4); }
.topMenuCellGradingSelected     { color:#fff !important; background-color:#F59E0B !important; box-shadow:0 6px 16px rgba(245,158,11,.4); }
.topMenuCellActivitySelected    { color:#fff !important; background-color:#EC4899 !important; box-shadow:0 6px 16px rgba(236,72,153,.4); }
.topMenuCellServiceSelected     { color:#fff !important; background-color:#8B5CF6 !important; box-shadow:0 6px 16px rgba(139,92,246,.4); }
.topMenuCellUserDetailSelected  { color:#fff !important; background-color:#14B8A6 !important; box-shadow:0 6px 16px rgba(20,184,166,.4); }
.topMenuCellRewardPunishSelected{ color:#fff !important; background-color:#EF4444 !important; box-shadow:0 6px 16px rgba(239,68,68,.4); }
.topMenuCellReportSelected      { color:#fff !important; background-color:#0EA5E9 !important; box-shadow:0 6px 16px rgba(14,165,233,.4); }
.topMenuCellUploadDataSelected  { color:#fff !important; background-color:#F97316 !important; box-shadow:0 6px 16px rgba(249,115,22,.4); }
.topMenuCellDownloadDataSelected{ color:#fff !important; background-color:#D946EF !important; box-shadow:0 6px 16px rgba(217,70,239,.4); }
.topMenuCellAdminSelected       { color:#fff !important; background-color:#334155 !important; box-shadow:0 6px 16px rgba(51,65,85,.4); }

/* 權限組別切換 */
.mainPermissionGroup select{
  font-size:16px;
  height:38px;
  border:1px solid #D8DFEA;
  border-left:5px solid var(--primary);
  border-radius:10px;
  background:#fff;
  color:var(--ink);
}
.mainCurrentPermissionGroupSubmitInput{
  font-size:15px;
  width:64px;
  height:38px;
  border:none;
  border-radius:10px;
  color:#fff;
  background:var(--primary);
  font-weight:500;
}
.mainCurrentPermissionGroupSubmitInput:hover{ background:var(--primary-dark); box-shadow:var(--shadow-md); }

/********************************************************/
/* 首頁 main                                               */
/********************************************************/
.main{
  background-color:var(--bg-soft);
  background-image:url('/img/ui/pattern-shapes.svg');
  box-shadow:inset 0 7px 15px -7px rgba(33,33,33,.18);
  font-size:19px;
  color:var(--ink);
}
.mainDate,.mainUserName,.mainLogout{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:18px 26px;
  margin-top:26px;
}
.mainDate{ padding-top:18px; border-left:6px solid var(--teal); font-weight:500; }
.mainUserName{ border-left:6px solid var(--primary); }
.mainLogout{ border-left:6px solid var(--amber); }
.blackLightGreyLink{ color:var(--primary); text-decoration:none; font-weight:500; }
.blackLightGreyLink:hover{ color:var(--primary-dark); text-decoration:underline; }

/********************************************************/
/* 內容頁通用提升                                          */
/********************************************************/

/* 連結統一現代色（僅限內容區，避免干擾特殊元件） */
.main a, .detailBody a{ color:var(--primary); }
.main a:hover, .detailBody a:hover{ color:var(--primary-dark); }

/********************************************************/
/* 響應式調整                                              */
/********************************************************/
/* 內容區外層：超寬表格只在內容區內橫向捲動，不撐破全頁 */
.detailWrap{ overflow-x:auto; }

/* 中等螢幕：選單縮小字級 */
@media (max-width:1024px){
  .topMenuBar{ font-size:15px; }
  .topMenuGrid{ gap:8px; }
  .topMenuGrid .topMenuCell{ flex:1 1 130px; min-height:46px; }
}

/* 窄螢幕（平板直向 / 手機） */
@media (max-width:768px){
  .shadowBar{ padding-bottom:16px; }
  .topMenuBar{ width:94%; padding-top:12px; }
  .topMenuGrid .topMenuCell{ flex:1 1 30%; font-size:14px; }
  .topBarRow{ align-items:center; }
  .topBarPermission{ margin-left:0; text-align:left; }
}

/* 登入頁窄螢幕：縮小校徽圓圈、輸入列可換行、按鈕取消 170px 偏移 */
@media (max-width:600px){
  .circleContainer{ width:160px; height:160px; border-width:6px; }
  .normalUserUserIcon,.normalUserPasswordIcon{ display:none; }
  .normalUserSubmitInputContainer{ padding-left:0; }
  .normalUserUsernameInput,.normalUserPasswordInput{ width:min(234px,52vw); }
  .normalUserSubmitInput{ width:min(266px,70vw); }
  .normalUserSchoolName{ padding-top:36px; }
}

/* 列印時隱藏裝飾 */
@media print{
  .normalUserBody::before,.normalUserBody::after{ display:none; }
  .detailWrap{ overflow-x:visible; }
}

/********************************************************/
/* 各功能頁面深度美化                                       */
/* 模組色：student 藍 / attend 綠 / grading 金 / activity 粉 */
/* service 紫 / userDetail 青 / rewardPunish 紅 / report 天藍 */
/* uploadData 橙 / sen 品紅 / admin 深灰                    */
/********************************************************/

/* ---------- 版面骨架：側欄 + 內容 ---------- */
.page{ min-height:60vh; }
.menuSideBar,[class*="MenuSideBar"]{
  background:linear-gradient(180deg,#1E293B 0%,#334155 100%);
  box-shadow:none;
  padding:14px 10px;
}
.detailBody{
  background-color:#F8FAFC;
  box-shadow:inset 0 7px 15px -7px rgba(15,23,42,.10);
  min-width:0;
}

/* 側欄選單項目（深色側欄 + 圓角懸停） */
.menuSideBar [class$="MenuItem" i],
[class*="MenuSideBar"] [class$="MenuItem" i]{
  width:auto;
  margin:2px 0;
  padding:13px 14px;
  border-radius:10px;
  font-size:17px;
  font-weight:500;
  color:#E2E8F0;
  position:relative;
  transition:background-color .15s ease,color .15s ease;
}
.menuSideBar [class$="MenuItem" i]:hover,
[class*="MenuSideBar"] [class$="MenuItem" i]:hover{
  background-color:rgba(255,255,255,.12);
  color:#fff;
  cursor:pointer;
}
/* 目前所在項目（支援 :has 的瀏覽器整列反白 + 左側亮線） */
.menuSideBar [class$="MenuItem" i]:has([class$="MenuItemChosen" i]),
[class*="MenuSideBar"] [class$="MenuItem" i]:has([class$="MenuItemChosen" i]){
  background-color:rgba(255,255,255,.18);
  color:#fff;
  box-shadow:inset 3px 0 0 #5EEAD4;
}
/* 舊式三角箭嘴 → 右側小圓點指示 */
.menuSideBar [class$="MenuItemChosen" i],
[class*="MenuSideBar"] [class$="MenuItemChosen" i]{
  border:0 !important;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#5EEAD4;
  position:absolute;
  left:auto;
  right:14px;
  top:50%;
  margin-top:-4px;
}
.menuSideBar .menuSideBarTitle,[class*="MenuSideBar"] .menuSideBarTitle{ padding-left:10px; }

/* ---------- 區段標題（圓角漸層色條） ---------- */
.studentSmallTitle,.attendSmallTitle,.gradingSmallTitle,.activitySmallTitle,
.serviceSmallTitle,.userDetailSmallTitle,.rewardPunishSmallTitle,.reportSmallTitle,
.uploadDataSmallTitle,.senSmallTitle,.adminSmallTitle,.downloadDataSmallTitle,
.permissionGroupSmallTitle{
  margin-top:36px;
  padding:13px 22px;
  border-radius:12px;
  font-size:21px;
  font-weight:700;
  letter-spacing:1px;
  box-shadow:var(--shadow-sm);
}
.studentSmallTitle     { background:linear-gradient(90deg,#3B82F6,#60A5FA); }
.attendSmallTitle      { background:linear-gradient(90deg,#10B981,#34D399); }
.gradingSmallTitle     { background:linear-gradient(90deg,#F59E0B,#FBBF24); }
.activitySmallTitle    { background:linear-gradient(90deg,#EC4899,#F472B6); }
.serviceSmallTitle     { background:linear-gradient(90deg,#8B5CF6,#A78BFA); }
.userDetailSmallTitle  { background:linear-gradient(90deg,#14B8A6,#2DD4BF); }
.rewardPunishSmallTitle{ background:linear-gradient(90deg,#EF4444,#F87171); }
.reportSmallTitle      { background:linear-gradient(90deg,#0EA5E9,#38BDF8); }
.uploadDataSmallTitle  { background:linear-gradient(90deg,#F97316,#FB923C); }
.senSmallTitle         { background:linear-gradient(90deg,#D946EF,#E879F9); }
.downloadDataSmallTitle{ background:linear-gradient(90deg,#D946EF,#E879F9); }
.adminSmallTitle,.permissionGroupSmallTitle{ background:linear-gradient(90deg,#334155,#64748B); }

/* ---------- 表格標題列（白字 + 模組色） ---------- */
[class*="TableTilteBackground"],[class*="TableTitleBackground"],[class*="TableBackground"]{
  color:#fff !important;
  font-weight:600;
  letter-spacing:.5px;
}
.studentTableTilteBackground,.studentTableBackground{ background-color:#3B82F6 !important; }
.attendTableTilteBackground   { background-color:#10B981 !important; }
.gradingTableTilteBackground  { background-color:#F59E0B !important; }
.activityTableTilteBackground { background-color:#EC4899 !important; }
.serviceTableTilteBackground  { background-color:#8B5CF6 !important; }
.rewardPunishTableTilteBackground,.rewardPunishTableTitleBackground,.rewardPunishTableBackground{ background-color:#EF4444 !important; }
.reportTableBackground        { background-color:#0EA5E9 !important; }
.uploadDataTableTilteBackground{ background-color:#F97316 !important; }
.senTableTilteBackground,.senTableBackground{ background-color:#D946EF !important; }
.adminTableBackground         { background-color:#475569 !important; }

/* 斑馬紋：柔灰取代刺眼青色 */
td.seperate0{ background-color:#EDF2F9 !important; }
td.seperate1{ background-color:#FFFFFF !important; }

/* Y/N 標記：柔和綠/紅 */
td.Y{ background-color:#D1FAE5 !important; color:#065F46; font-weight:600; }
td.N{ background-color:#FEE2E2 !important; color:#991B1B; font-weight:600; }

/* 無資料狀態：淡色底 + 插畫 */
.activityEmptyBackground,.attendEmptyBackground,.gradingEmptyBackground,
.serviceEmptyBackground,.adminEmptyBackground,.rewardPunishTableEmptyBackground,
.senTableEmptyBackground{
  background-color:#F8FAFC !important;
  background-image:url('/img/ui/empty-state.svg');
  background-repeat:no-repeat;
  background-position:center;
  background-size:130px;
  color:#64748B;
}

/* ---------- 按鈕（圓角膠囊 + 模組色） ---------- */
/* 注意:*Button / *FileButton 是容器 div(只作版面用途,不著色);
   膠囊樣式只套用在容器內的 input 按鈕、*Confirm 按鈕與 .inputLabel 上 */
[class$="Button"] input[type="button"],[class$="Button"] input[type="submit"],
[class$="Footer"] input[type="button"],[class$="Footer"] input[type="submit"],
.card input[type="submit"],.card input[type="button"],
.activityConfirm,.attendConfirm,.serviceConfirm,.rewardPunishConfirm,.senConfirm,
.adminConfirm,.adminDeleteConfirm,.deleteConfirm,
[class$="FileButton"] .inputLabel{
  width:auto;
  height:auto;
  min-width:110px;
  border:none;
  border-radius:999px;
  padding:9px 24px;
  font-size:15px;
  font-weight:600;
  letter-spacing:1px;
  color:#fff;
  background:#6366F1;
  box-shadow:var(--shadow-sm);
}
/* 模組色:按鈕跟隨所屬模組 */
.attendButton input[type="button"],.attendButton input[type="submit"],
.attendFooter input[type="button"],.attendFooter input[type="submit"],
.attendConfirm{ background:#10B981 !important; }
.gradingButton input[type="button"],.gradingButton input[type="submit"],
.gradingFooter input[type="button"],.gradingFooter input[type="submit"]{ background:#F59E0B !important; }
.activityButton input[type="button"],.activityButton input[type="submit"],
.activityFooter input[type="button"],.activityFooter input[type="submit"],
.activityConfirm{ background:#EC4899 !important; }
.serviceButton input[type="button"],.serviceButton input[type="submit"],
.serviceFooter input[type="button"],.serviceFooter input[type="submit"],
.serviceConfirm{ background:#8B5CF6 !important; }
.userDetailButton input[type="button"],.userDetailButton input[type="submit"],
.userDetailFooter input[type="button"],.userDetailFooter input[type="submit"]{ background:#14B8A6 !important; }
.rewardPunishButton input[type="button"],.rewardPunishButton input[type="submit"],
.rewardPunishFooter input[type="button"],.rewardPunishFooter input[type="submit"],
.rewardPunishConfirm{ background:#EF4444 !important; }
.reportButton input[type="button"],.reportButton input[type="submit"],
.reportFooter input[type="button"],.reportFooter input[type="submit"]{ background:#0EA5E9 !important; }
.uploadDataButton input[type="button"],.uploadDataButton input[type="submit"],
.uploadDataFooter input[type="button"],.uploadDataFooter input[type="submit"],
.uploadDataFileButton .inputLabel{ background:#F97316 !important; }
.senButton input[type="button"],.senButton input[type="submit"],
.senFooter input[type="button"],.senFooter input[type="submit"],
.senConfirm{ background:#D946EF !important; }
.downloadDataButton input[type="button"],.downloadDataButton input[type="submit"]{ background:#D946EF !important; }
.adminButton input[type="button"],.adminButton input[type="submit"],
.adminFooter input[type="button"],.adminFooter input[type="submit"],
.adminConfirm,.adminFileButton .inputLabel{ background:#475569 !important; }
.adminDeleteConfirm,.deleteConfirm{ background:#DC2626 !important; }
/* 卡片色標題對應的無容器按鈕(如學生搜尋卡內的 submit) */
.card:has(.ct-blue) input[type="submit"],.card:has(.ct-blue) input[type="button"]{ background:#3B82F6 !important; }
.card:has(.ct-green) input[type="submit"],.card:has(.ct-green) input[type="button"]{ background:#10B981 !important; }
.card:has(.ct-amber) input[type="submit"],.card:has(.ct-amber) input[type="button"]{ background:#F59E0B !important; }
.card:has(.ct-pink) input[type="submit"],.card:has(.ct-pink) input[type="button"]{ background:#EC4899 !important; }
.card:has(.ct-violet) input[type="submit"],.card:has(.ct-violet) input[type="button"]{ background:#8B5CF6 !important; }
.card:has(.ct-teal) input[type="submit"],.card:has(.ct-teal) input[type="button"]{ background:#14B8A6 !important; }
.card:has(.ct-red) input[type="submit"],.card:has(.ct-red) input[type="button"]{ background:#EF4444 !important; }
.card:has(.ct-sky) input[type="submit"],.card:has(.ct-sky) input[type="button"]{ background:#0EA5E9 !important; }
.card:has(.ct-orange) input[type="submit"],.card:has(.ct-orange) input[type="button"]{ background:#F97316 !important; }
.card:has(.ct-fuchsia) input[type="submit"],.card:has(.ct-fuchsia) input[type="button"]{ background:#D946EF !important; }
.card:has(.ct-slate) input[type="submit"],.card:has(.ct-slate) input[type="button"]{ background:#475569 !important; }
[class$="Button"] input[type="button"]:hover,[class$="Button"] input[type="submit"]:hover,
[class$="Footer"] input[type="button"]:hover,[class$="Footer"] input[type="submit"]:hover,
.card input[type="submit"]:hover,.card input[type="button"]:hover,
.activityConfirm:hover,.attendConfirm:hover,.serviceConfirm:hover,
.rewardPunishConfirm:hover,.senConfirm:hover,.adminConfirm:hover,
[class$="FileButton"] .inputLabel:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
  filter:brightness(1.08);
}

/* ---------- 分頁（圓角頁碼芯片） ---------- */
[class*="PageIndex"] td{ border-radius:8px; transition:background-color .15s ease; }
[class*="PageIndex"] td.chosen{
  background:#fff !important;
  color:var(--primary-dark) !important;
  font-weight:700;
  box-shadow:var(--shadow-sm);
}
[class*="PageIndex"] td.unClickable{ background:#E2E8F0 !important; color:#94A3B8; }
[class*="PageIndex"] td.clickable:hover{ background:#C7D2FE !important; color:#1E1B4B; }

/* ---------- 表單元件（內容區） ---------- */
.detailBody input[type="text"],.detailBody input[type="textfield"],
.detailBody input[type="password"],.detailBody input[type="number"],
.detailBody input[type="date"],.detailBody select,.detailBody textarea,
.main input[type="text"],.main input[type="textfield"],.main select,.main textarea{
  border:1px solid #D8DFEA;
  border-radius:8px;
  padding:7px 10px;
  background-color:#fff;
  font-family:inherit;
  color:var(--ink);
}
.detailBody input[type="checkbox"],.detailBody input[type="radio"],
.main input[type="checkbox"],.main input[type="radio"]{
  width:16px;
  height:16px;
  accent-color:var(--primary);
  vertical-align:middle;
}

/* ---------- 窄螢幕：側欄變頂部橫向分頁列 ---------- */
@media (max-width:900px){
  .page{ grid-template-columns:1fr; min-height:0; }
  .menuSideBar,[class*="MenuSideBar"]{
    grid-column:1 / -1;
    display:flex;
    overflow-x:auto;
    padding:8px;
  }
  .menuSideBar [class$="MenuItem" i],
  [class*="MenuSideBar"] [class$="MenuItem" i]{
    flex:0 0 auto;
    white-space:nowrap;
    padding:10px 14px;
    font-size:15px;
    margin:0 2px;
  }
  .menuSideBar [class$="MenuItemChosen" i],
  [class*="MenuSideBar"] [class$="MenuItemChosen" i]{ display:none; }
  .menuSideBar [class$="MenuItem" i]:has([class$="MenuItemChosen" i]),
  [class*="MenuSideBar"] [class$="MenuItem" i]:has([class$="MenuItemChosen" i]){
    box-shadow:none;
    background-color:rgba(255,255,255,.22);
  }
  .detailBody{ grid-column:1 / -1; }
  .studentSmallTitle,.attendSmallTitle,.gradingSmallTitle,.activitySmallTitle,
  .serviceSmallTitle,.userDetailSmallTitle,.rewardPunishSmallTitle,.reportSmallTitle,
  .uploadDataSmallTitle,.senSmallTitle,.adminSmallTitle,.downloadDataSmallTitle,
  .permissionGroupSmallTitle{
    margin-top:24px;
    font-size:18px;
  }
}

/********************************************************/
/* 字體系統與密度（專業後台標準）                              */
/* 設計原則：內文 15px、行高 1.7、固定字級階梯、等寬數字       */
/********************************************************/
:root{
  --fs-xs:12px;   /* 輔助說明 */
  --fs-sm:13px;   /* 表格次要資料 */
  --fs-base:15px; /* 內文、表格、選單 */
  --fs-md:16px;   /* 卡片內容、按鈕 */
  --fs-lg:18px;   /* 小標題 */
  --fs-xl:20px;   /* 區段標題 */
  --fs-2xl:26px;  /* 頁面主標題 */
}

/* 基準字級：原 20px 全部降至 15–16px（現代後台密度） */
.page{ font-size:var(--fs-base); line-height:1.7; }
.main{ font-size:var(--fs-md); line-height:1.7; }
.topMenuBar{ font-size:var(--fs-base); }

/* 表格：統一 15px + 數字等寬（金額/日期/學號垂直對齊） */
.detailBody table,.main table{ font-size:var(--fs-base); }
.detailBody td,.detailBody th,.main td{ font-variant-numeric:tabular-nums; }

/* 側欄與頂部選單字級收斂 */
.menuSideBar [class$="MenuItem" i],
[class*="MenuSideBar"] [class$="MenuItem" i]{ font-size:var(--fs-base); font-weight:500; }

/* 區段標題字級收斂（21px → 20px，納入字級階梯） */
.studentSmallTitle,.attendSmallTitle,.gradingSmallTitle,.activitySmallTitle,
.serviceSmallTitle,.userDetailSmallTitle,.rewardPunishSmallTitle,.reportSmallTitle,
.uploadDataSmallTitle,.senSmallTitle,.adminSmallTitle,.downloadDataSmallTitle,
.permissionGroupSmallTitle{ font-size:var(--fs-xl); font-weight:700; }

/* 檔案選擇容器還原為版面用途(膠囊樣式由 .inputLabel 承擔) */
.uploadDataFileButton,.adminFileButton{
  width:auto;
  background:none;
  padding-left:0;
  font-size:var(--fs-base);
}

/* 表單元件字級（input/select 不會自動繼承，必須明確設定） */
.detailBody input[type="text"],.detailBody input[type="textfield"],
.detailBody input[type="password"],.detailBody input[type="number"],
.detailBody input[type="date"],.detailBody select,.detailBody textarea,
.main input[type="text"],.main input[type="textfield"],.main select,.main textarea{
  font-size:var(--fs-base);
  line-height:1.5;
}

/* 首頁資訊卡片字級 */
.mainDate,.mainUserName,.mainLogout{ font-size:var(--fs-md); }

/* 表格列高呼吸感：資料格增加垂直內距 */
.detailBody table td{ padding-top:6px; padding-bottom:6px; }

/********************************************************/
/* 明亮活力設計系統 v2（套用自設計稿）                        */
/********************************************************/

/* 內容區活潑底紋 */
.detailBody,.main{
  background-color:#F6F7F9;
  background-image:url('/img/ui/pattern-bright.svg');
}

/* ---------- 鮮艷漸層（圖示/統計卡用） ---------- */
.g-blue  { background:linear-gradient(135deg,#60A5FA,#3B82F6) !important; box-shadow:0 6px 14px rgba(59,130,246,.4); }
.g-green { background:linear-gradient(135deg,#34D399,#10B981) !important; box-shadow:0 6px 14px rgba(16,185,129,.4); }
.g-pink  { background:linear-gradient(135deg,#F472B6,#EC4899) !important; box-shadow:0 6px 14px rgba(236,72,153,.4); }
.g-amber { background:linear-gradient(135deg,#FBBF24,#F59E0B) !important; box-shadow:0 6px 14px rgba(245,158,11,.4); }
.g-violet{ background:linear-gradient(135deg,#A78BFA,#8B5CF6) !important; box-shadow:0 6px 14px rgba(139,92,246,.4); }
.g-red   { background:linear-gradient(135deg,#F87171,#EF4444) !important; box-shadow:0 6px 14px rgba(239,68,68,.4); }
.g-sky   { background:linear-gradient(135deg,#38BDF8,#0EA5E9) !important; box-shadow:0 6px 14px rgba(14,165,233,.4); }
.g-orange{ background:linear-gradient(135deg,#FB923C,#F97316) !important; box-shadow:0 6px 14px rgba(249,115,22,.4); }
.g-fuchsia{ background:linear-gradient(135deg,#E879F9,#D946EF) !important; box-shadow:0 6px 14px rgba(217,70,239,.4); }
.g-slate { background:linear-gradient(135deg,#64748B,#475569) !important; box-shadow:0 6px 14px rgba(71,85,105,.4); }
.g-teal  { background:linear-gradient(135deg,#2DD4BF,#14B8A6) !important; box-shadow:0 6px 14px rgba(20,184,166,.4); }

/* ---------- 頂部功能選單：卡片 → 分頁籤 ---------- */
.topMenuGrid{ gap:4px; border-bottom:2px solid #E5E8EE; padding-bottom:0; }
.topMenuGrid .topMenuCell{
  background:transparent;
  box-shadow:none;
  border-radius:10px 10px 0 0;
  border-bottom:3px solid transparent;
  min-height:44px;
  padding:8px 10px;
  color:var(--ink-soft);
  flex:1 1 120px;
}
.topMenuGrid .topMenuCell:hover{
  background:#F1F5F9;
  color:var(--ink);
  transform:none;
  box-shadow:none;
}
.topMenuCellMainSelected        { background:#F1F5F9 !important; color:#334155 !important; border-bottom-color:#64748B !important; box-shadow:none !important; font-weight:700; }
.topMenuCellStudentSelected     { background:#EFF6FF !important; color:#1D4ED8 !important; border-bottom-color:#3B82F6 !important; box-shadow:none !important; font-weight:700; }
.topMenuCellAttendSelected      { background:#ECFDF5 !important; color:#047857 !important; border-bottom-color:#10B981 !important; box-shadow:none !important; font-weight:700; }
.topMenuCellGradingSelected     { background:#FFFBEB !important; color:#B45309 !important; border-bottom-color:#F59E0B !important; box-shadow:none !important; font-weight:700; }
.topMenuCellActivitySelected    { background:#FDF2F8 !important; color:#BE185D !important; border-bottom-color:#EC4899 !important; box-shadow:none !important; font-weight:700; }
.topMenuCellServiceSelected     { background:#F5F3FF !important; color:#6D28D9 !important; border-bottom-color:#8B5CF6 !important; box-shadow:none !important; font-weight:700; }
.topMenuCellUserDetailSelected  { background:#F0FDFA !important; color:#0F766E !important; border-bottom-color:#14B8A6 !important; box-shadow:none !important; font-weight:700; }
.topMenuCellRewardPunishSelected{ background:#FEF2F2 !important; color:#B91C1C !important; border-bottom-color:#EF4444 !important; box-shadow:none !important; font-weight:700; }
.topMenuCellReportSelected      { background:#F0F9FF !important; color:#0369A1 !important; border-bottom-color:#0EA5E9 !important; box-shadow:none !important; font-weight:700; }
.topMenuCellUploadDataSelected  { background:#FFF7ED !important; color:#C2410C !important; border-bottom-color:#F97316 !important; box-shadow:none !important; font-weight:700; }
.topMenuCellDownloadDataSelected{ background:#FDF4FF !important; color:#A21CAF !important; border-bottom-color:#D946EF !important; box-shadow:none !important; font-weight:700; }
.topMenuCellAdminSelected       { background:#F1F5F9 !important; color:#334155 !important; border-bottom-color:#334155 !important; box-shadow:none !important; font-weight:700; }

/* ---------- 表格標題列：飽和色塊 → 淺色底深字 ---------- */
.studentTableTilteBackground,.studentTableBackground{ background-color:#EFF6FF !important; color:#1E40AF !important; }
.attendTableTilteBackground   { background-color:#ECFDF5 !important; color:#065F46 !important; }
.gradingTableTilteBackground  { background-color:#FFFBEB !important; color:#92400E !important; }
.activityTableTilteBackground { background-color:#FDF2F8 !important; color:#9D174D !important; }
.serviceTableTilteBackground  { background-color:#F5F3FF !important; color:#5B21B6 !important; }
.rewardPunishTableTilteBackground,.rewardPunishTableTitleBackground,.rewardPunishTableBackground{ background-color:#FEF2F2 !important; color:#991B1B !important; }
.reportTableBackground        { background-color:#F0F9FF !important; color:#0C4A6E !important; }
.uploadDataTableTilteBackground{ background-color:#FFF7ED !important; color:#9A3412 !important; }
.senTableTilteBackground,.senTableBackground{ background-color:#FDF4FF !important; color:#86198F !important; }
.adminTableBackground         { background-color:#F1F5F9 !important; color:#334155 !important; }

/* ---------- 徽章 ---------- */
.badge{ display:inline-flex; align-items:center; gap:5px; padding:3px 11px; border-radius:999px; font-size:12px; font-weight:600; letter-spacing:.3px; }
.badge::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge-green{ background:#ECFDF5; color:#047857; }
.badge-slate{ background:#F1F5F9; color:#475569; }
.badge-amber{ background:#FFFBEB; color:#B45309; }
.badge-blue { background:#EFF6FF; color:#1D4ED8; }
.badge-pink { background:#FDF2F8; color:#BE185D; }

/* ---------- 頭像（姓氏首字 + 漸層） ---------- */
.avatar{ width:34px; height:34px; border-radius:50%; color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; flex:0 0 34px; box-shadow:0 3px 8px rgba(16,24,40,.18); }
.av-blue  { background:linear-gradient(135deg,#60A5FA,#3B82F6); }
.av-violet{ background:linear-gradient(135deg,#A78BFA,#8B5CF6); }
.av-pink  { background:linear-gradient(135deg,#F472B6,#EC4899); }
.av-green { background:linear-gradient(135deg,#34D399,#10B981); }
.av-amber { background:linear-gradient(135deg,#FBBF24,#F59E0B); }
.av-sky   { background:linear-gradient(135deg,#38BDF8,#0EA5E9); }
.av-red   { background:linear-gradient(135deg,#F87171,#EF4444); }
.av-teal  { background:linear-gradient(135deg,#2DD4BF,#14B8A6); }

/* ---------- 卡片 ---------- */
.card{ background:#fff; border:1px solid #E5E8EE; border-radius:12px; box-shadow:0 1px 2px rgba(16,24,40,.05); }
.card-pad{ padding:20px 22px; }
.card-title{ font-size:16px; font-weight:700; display:flex; align-items:center; gap:8px; margin-bottom:14px; color:var(--ink); }
.card-title::before{ content:""; width:4px; height:18px; border-radius:2px; background:var(--primary); }
.card-title.ct-blue::before{ background:#3B82F6; }
.card-title.ct-green::before{ background:#10B981; }
.card-title.ct-amber::before{ background:#F59E0B; }
.card-title.ct-pink::before{ background:#EC4899; }
.card-title.ct-violet::before{ background:#8B5CF6; }
.card-title.ct-teal::before{ background:#14B8A6; }
.card-title.ct-red::before{ background:#EF4444; }
.card-title.ct-sky::before{ background:#0EA5E9; }
.card-title.ct-orange::before{ background:#F97316; }
.card-title.ct-fuchsia::before{ background:#D946EF; }
.card-title.ct-slate::before{ background:#64748B; }

/* ---------- 首頁儀表板 ---------- */
.banner{
  position:relative; overflow:hidden;
  border-radius:22px;
  background:linear-gradient(115deg,#6366F1 0%,#8B5CF6 48%,#EC4899 100%);
  color:#fff;
  padding:36px 300px 36px 40px;
  margin:26px auto 24px;
  width:90%;
  box-shadow:0 14px 34px rgba(139,92,246,.38);
  box-sizing:border-box;
}
.banner h1{ font-size:27px; font-weight:900; margin:0 0 6px; letter-spacing:1px; }
.banner p{ margin:0; opacity:.93; font-size:15px; }
.banner a.banner-link{ display:inline-block; margin-top:16px; background:#fff; color:var(--primary-dark); border-radius:10px; padding:9px 20px; font-weight:600; font-size:15px; text-decoration:none; transition:transform .15s ease; }
.banner a.banner-link:hover{ transform:translateY(-2px); }
.banner .banner-art{ position:absolute; right:8px; bottom:-6px; width:290px; height:100%; background:url('/img/ui/banner-school.svg') no-repeat right bottom / contain; pointer-events:none; }
@media (max-width:1100px){ .banner{ padding-right:40px; } .banner .banner-art{ opacity:.25; } }

.stats{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:16px; width:90%; margin:0 auto 22px; }
.stat{ background:#fff; border:1px solid #E5E8EE; border-radius:12px; padding:18px 20px; box-shadow:0 1px 2px rgba(16,24,40,.05); display:flex; gap:14px; align-items:center; transition:transform .15s ease, box-shadow .2s ease; }
.stat:hover{ transform:translateY(-3px); box-shadow:0 4px 12px rgba(16,24,40,.08); }
.stat-icon{ width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex:0 0 46px; color:#fff; font-size:22px; }
.stat-num{ font-size:26px; font-weight:800; line-height:1.2; font-variant-numeric:tabular-nums; color:var(--ink); }
.stat-label{ color:#6B7280; font-size:13px; }

.quickgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:14px; }
.quick{ background:#fff; border:1px solid #E5E8EE; border-radius:12px; padding:18px 14px; text-align:center; box-shadow:0 1px 2px rgba(16,24,40,.05); transition:transform .15s ease, box-shadow .2s ease; cursor:pointer; }
.quick:hover{ transform:translateY(-3px); box-shadow:0 4px 12px rgba(16,24,40,.08); }
.quick-icon{ width:44px; height:44px; margin:0 auto 8px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:20px; transition:transform .22s cubic-bezier(.34,1.56,.64,1); }
.quick:hover .quick-icon{ transform:scale(1.15) rotate(-8deg); }
.quick-name{ font-weight:600; font-size:14px; color:var(--ink); }

/* 時間線（校曆事項） */
.timeline{ list-style:none; margin:0; padding:0; }
.timeline li{ display:flex; gap:14px; padding:10px 0; border-bottom:1px solid #F0F2F6; align-items:center; }
.timeline li:last-child{ border-bottom:none; }
.timeline .t-ic{ width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex:0 0 34px; color:#fff; font-size:15px; }
.timeline .t-title{ font-weight:600; font-size:14px; color:var(--ink); }
.timeline .t-time{ margin-left:auto; color:#9CA3AF; font-size:12px; white-space:nowrap; font-variant-numeric:tabular-nums; }

/* ---------- 篩選卡（搜尋表單 + 插畫） ---------- */
.filtercard{ position:relative; overflow:hidden; background:linear-gradient(100deg,#FFFFFF 55%,#EFF6FF 100%); }
.filtercard .filterart{ position:absolute; right:14px; top:50%; margin-top:-60px; width:150px; height:120px; background:url('/img/ui/spot-search.svg') no-repeat center / contain; pointer-events:none; }
@media (max-width:1100px){ .filtercard .filterart{ display:none; } }
/* 卡片內的搜尋表改為全寬 */
.card .studentSearchAcademicYear,.card .studentSearchSTRN{ width:100%; }
.card > form > table,.card > table{ width:100%; }

/* ---------- 學生檔案頭卡 ---------- */
.profile-card{ position:relative; overflow:visible; }
.profile-card::before{ content:""; position:absolute; left:0; right:0; top:0; height:6px; border-radius:12px 12px 0 0; background:linear-gradient(90deg,#3B82F6,#8B5CF6,#EC4899,#F59E0B,#34D399); }
.profile-card::after{ content:""; position:absolute; right:22px; top:-26px; width:92px; height:92px; background:url('/img/ui/spot-cap.svg') no-repeat center / contain; filter:drop-shadow(0 6px 10px rgba(16,24,40,.18)); pointer-events:none; }
.profile-head{ display:flex; gap:20px; align-items:center; flex-wrap:wrap; }
.profile-photo{ width:88px; height:88px; border-radius:20px; object-fit:cover; background:linear-gradient(135deg,#3B82F6,#8B5CF6); color:#fff; display:flex; align-items:center; justify-content:center; font-size:34px; font-weight:800; flex:0 0 88px; }
.profile-name{ font-size:22px; font-weight:800; color:var(--ink); }
.profile-meta{ color:#6B7280; font-size:14px; display:flex; gap:14px; flex-wrap:wrap; margin-top:2px; align-items:center; }
.profile-meta b{ color:var(--ink); }

/* ---------- 資訊格 ---------- */
.infogrid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px 20px; }
.infogrid .info label{ display:block; font-size:12px; color:#9CA3AF; font-weight:600; margin-bottom:1px; }
.infogrid .info div{ font-size:15px; font-weight:600; color:var(--ink); }

/* 首頁區塊排版 */
.homeblock{ width:90%; margin:0 auto 22px; box-sizing:border-box; }
.homegrid{ display:grid; grid-template-columns:2fr 1fr; gap:18px; width:90%; margin:0 auto 40px; }
@media (max-width:900px){ .homegrid{ grid-template-columns:1fr; } }

/********************************************************/
/* v3 比例與易讀性修正                                     */
/********************************************************/
/* 側欄收窄,內容區更寬敞 */
.page{ grid-template-columns:230px auto; }

/* 底紋淡化:加半透白漸層覆蓋,保留活潑感但不干擾閱讀 */
.detailBody,.main{
  background-image:linear-gradient(rgba(246,247,249,.85),rgba(246,247,249,.85)),url('/img/ui/pattern-bright.svg');
}

/* 卡片緊緻化 + 隱藏空白間隔列 */
.card-pad{ padding:18px 20px; }
.card tr:empty{ display:none; }

/* 篩選卡:右側預留插畫位置;插畫縮小、淡化並置於內容後方,不再遮蓋表單 */
.filtercard{ padding-right:180px; }
.filtercard > *:not(.filterart){ position:relative; z-index:1; }
.filtercard .filterart{ z-index:0; opacity:.5; width:120px; height:96px; margin-top:-48px; }
@media (max-width:1100px){ .filtercard{ padding-right:20px; } }

/* 卡片內的按鈕容器還原為版面用途(取消 90% 寬與頂部框線) */
.card [class$="Button"],.card [class$="Footer"]{ width:auto; margin:10px 0 0; border-top:none; padding-top:0; }

/* 卡片內下拉與文字輸入:統一高度與行高,字體完整顯示不被裁切 */
.card select,.card input[type="text"],.card input[type="textfield"]{
  height:38px !important;
  line-height:38px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  font-size:15px !important;
  border:1px solid #D8DFEA !important;
  border-radius:10px;
  box-sizing:border-box;
}

/* 頂部選單:寬螢幕時 12 項保持單行排列 */
@media (min-width:1400px){
  .topMenuGrid{ flex-wrap:nowrap; }
  .topMenuGrid .topMenuCell{ flex:1 1 0; min-width:0; font-size:13px; padding:8px 2px; min-height:44px; }
  .topMenuCell i{ margin-right:4px; }
}

/* ===== v3.1 模組底色柔化：淡化舊版高飽和底色，改用各模組主色的淺色調 ===== */
.detailBody{ background-color:#EFF6FF !important; }                 /* 學生 藍 */
.attendDetailBody{ background-color:#ECFDF5 !important; }           /* 考勤 綠 */
.gradingDetailBody{ background-color:#FFFBEB !important; }          /* 成績 琥珀 */
.activityDetailBody{ background-color:#FDF2F8 !important; }         /* 活動 粉紅 */
.serviceDetailBody{ background-color:#F5F3FF !important; }          /* 校內服務 紫 */
.userDetailDetailBody{ background-color:#F0FDFA !important; }       /* 個人資料 青 */
.rewardPunishDetailBody{ background-color:#FEF2F2 !important; }     /* 獎懲 紅 */
.reportDetailBody{ background-color:#F0F9FF !important; }           /* 報告 天藍 */
.uploadDataDetailBody{ background-color:#FFF7ED !important; }       /* 上傳 橙 */
.downloadDataDetailBody,.senDetailBody{ background-color:#FDF4FF !important; } /* SEN/下載 品紅 */
.adminDetailBody{ background-color:#F8FAFC !important; }            /* 管理員 石板灰 */

/* ===== 平台管理中心 (/platform) ===== */
.pfBody{ margin:0; min-height:100vh; background:#F4F6FB; font-family:'Noto Sans TC',sans-serif; }
.pfTop{ display:flex; align-items:center; gap:24px; flex-wrap:wrap; padding:14px 28px; background:#fff; box-shadow:0 2px 12px rgba(30,41,59,.08); position:sticky; top:0; z-index:10; }
.pfBrand{ display:flex; align-items:center; gap:12px; }
.pfBrand img{ width:44px; height:44px; border-radius:12px; }
.pfBrandZh{ font-size:17px; font-weight:900; color:var(--ink); }
.pfBrandEn{ font-size:11.5px; color:var(--ink-soft); }
.pfNav{ margin-left:auto; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.pfNav a{ padding:8px 14px; border-radius:999px; font-size:14px; font-weight:700; color:var(--ink-soft); text-decoration:none; }
.pfNav a:hover{ background:#EEF2FF; color:#4F46E5; }
.pfNav a.on{ background:linear-gradient(120deg,#6366F1,#8B5CF6); color:#fff; }
.pfNav .pfUser{ margin-left:10px; font-size:13.5px; color:var(--ink); font-weight:700; }
.pfNav .pfOut{ color:#EF4444; }
.pfMain{ max-width:1080px; margin:26px auto; padding:0 20px 40px; }
.pfMain .card{ margin-bottom:20px; }
.pfStats{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; margin-bottom:20px; }
.pfStat{ background:linear-gradient(135deg,#6366F1,#8B5CF6); border-radius:18px; padding:22px 20px; color:#fff; box-shadow:0 12px 24px -12px rgba(99,102,241,.5); }
.pfStat:nth-child(2){ background:linear-gradient(135deg,#10B981,#14B8A6); box-shadow:0 12px 24px -12px rgba(16,185,129,.5); }
.pfStat:nth-child(3){ background:linear-gradient(135deg,#F59E0B,#F97316); box-shadow:0 12px 24px -12px rgba(245,158,11,.5); }
.pfStatNum{ font-size:34px; font-weight:900; }
.pfStatLabel{ font-size:13.5px; opacity:.92; margin-top:2px; }
.pfTable{ width:100%; border-collapse:collapse; font-size:14.5px; }
.pfTable th{ text-align:left; padding:10px 12px; color:var(--ink-soft); font-weight:700; border-bottom:2px solid #E2E8F0; white-space:nowrap; }
.pfTable td{ padding:10px 12px; border-bottom:1px solid #EEF2F7; vertical-align:middle; }
.pfTable code{ background:#F1F5F9; padding:2px 8px; border-radius:6px; font-size:13px; }
.pfBadge{ display:inline-block; padding:3px 12px; border-radius:999px; font-size:12.5px; font-weight:700; }
.pfBadgeOn{ background:#D1FAE5; color:#047857; }
.pfBadgeOff{ background:#FEE2E2; color:#B91C1C; }
.pfBtn{ display:inline-block; padding:10px 22px; border:none; border-radius:999px; background:linear-gradient(120deg,#6366F1,#8B5CF6); color:#fff; font-size:15px; font-weight:700; cursor:pointer; text-decoration:none; }
.pfBtn:hover{ filter:brightness(1.08); }
.pfBtnGhost{ background:#F1F5F9; color:var(--ink); margin-left:8px; }
.pfBtnSm{ display:inline-block; padding:6px 14px; border:none; border-radius:999px; background:#EEF2FF; color:#4F46E5; font-size:13px; font-weight:700; cursor:pointer; text-decoration:none; }
.pfBtnSm:hover{ background:#E0E7FF; }
.pfBtnDanger{ background:#FEE2E2; color:#B91C1C; }
.pfBtnDanger:hover{ background:#FECACA; }
.pfLabel{ display:block; margin:14px 0 6px; font-size:14px; font-weight:700; color:var(--ink); }
.pfHint{ display:block; font-weight:400; font-size:12px; color:var(--ink-soft); margin-top:2px; }
.pfInput{ width:100%; box-sizing:border-box; padding:10px 14px; border:1px solid #D8DFEA; border-radius:10px; font-size:14.5px; font-family:inherit; }
.pfInput:focus{ outline:none; border-color:#6366F1; box-shadow:0 0 0 3px rgba(99,102,241,.15); }
.pfInputSm{ max-width:200px; padding:7px 12px; font-size:13px; }
.pfGrid2{ display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:0 24px; }
.pfModGrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
.pfModItem{ display:flex; align-items:center; gap:8px; padding:10px 14px; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:10px; font-size:14px; font-weight:500; cursor:pointer; }
.pfModItem:hover{ border-color:#A5B4FC; }
.pfMsg{ padding:12px 18px; border-radius:12px; background:#D1FAE5; color:#047857; font-weight:700; font-size:14px; margin-bottom:16px; }
.pfMsgErr{ background:#FEE2E2; color:#B91C1C; }
.pfSchoolLogo{ width:28px; height:28px; object-fit:contain; border-radius:8px; vertical-align:middle; margin-right:6px; background:#fff; }
.pfLogoPreview{ width:96px; height:96px; object-fit:contain; border-radius:16px; border:1px solid #E2E8F0; background:#fff; padding:6px; box-sizing:border-box; }
.pfLogoEmpty{ display:flex; align-items:center; justify-content:center; color:#94A3B8; font-size:13px; }
.pfBackRow{ margin-bottom:14px; }
.pfBackRow a{ color:#6366F1; text-decoration:none; font-size:14px; font-weight:700; }

/* ---- 平台:教育局學校搜尋/篩選 ---- */
.pfSearchWrap{position:relative;max-width:560px;}
.pfSearchDrop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid #E2E8F0;border-radius:14px;box-shadow:0 16px 40px rgba(15,23,42,.16);z-index:50;max-height:340px;overflow:auto;}
.pfSearchItem{padding:10px 14px;cursor:pointer;border-bottom:1px solid #F1F5F9;font-size:14px;}
.pfSearchItem:last-child{border-bottom:none;}
.pfSearchItem:hover{background:#EEF2FF;}
.pfPicked{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:10px;padding:12px 16px;background:linear-gradient(135deg,#EEF2FF,#FDF4FF);border:1px solid #C7D2FE;border-radius:14px;font-size:14px;}
.pfFilterBar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px;}
.pfFilterBar .pfInput{margin:0;}
.pfPages{display:flex;align-items:center;gap:14px;margin-top:16px;justify-content:center;color:#64748B;font-size:14px;}
