/* ================================================================
 * system_skin.css | 線上測驗、作業、會員管理、課程進度管理頁面
 * 讓系統頁面與教學網站（profile_site.css）同一套風格：
 * 深藍品牌色、白底、淡藍分隔線、粗體無襯線標題、圓角膠囊按鈕。
 * 只作用在 body.system-page，教學網站其他頁面不受影響。
 * 原本頁面裡使用的樣式名稱（card-fashion、btn-cta…）都保留，只改外觀。
 * ================================================================ */

.system-page {
  /* 原 style.css 的變數名稱，對應到教學網站的配色（頁面內聯樣式仍會用到） */
  --bg-paper: #f6f9fc;
  --bg-sage: var(--ice);
  --bg-pebble: #f3f6fa;
  --bg-card: #fff;
  --text-ink: var(--ink);
  --text-secondary: #44546a;
  --text-muted: var(--muted);
  --border-delicate: var(--line);
  --border-medium: #b9c9da;
  --accent-terracotta: #c0392b;
  --accent-ochre: var(--blue);
  --accent-forest: var(--navy);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  background: #f6f9fc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 版面：導覽列是 fixed-top（高 78px），內容往下推 */
.system-page .system-main {
  flex: 1 0 auto;
  padding: 112px 0 64px;
}
.system-page .site-footer { flex-shrink: 0; }

/* 標題：與教學網站相同的粗體深藍無襯線 */
.system-page h1, .system-page h2, .system-page h3,
.system-page h4, .system-page h5, .system-page h6,
.system-page .font-serif {
  font-family: inherit;
  color: var(--navy);
  letter-spacing: -.02em;
}
.system-page h1, .system-page h2, .system-page h3 { font-weight: 850; }
.system-page h4, .system-page h5, .system-page h6 { font-weight: 800; }
.system-page .text-dark { color: var(--navy) !important; }

/* 標題旁的圖示：原本是黃色，改成教學網站的藍色重點色 */
.system-page h1 .bi.text-warning, .system-page h2 .bi.text-warning,
.system-page h3 .bi.text-warning, .system-page h4 .bi.text-warning,
.system-page h5 .bi.text-warning, .system-page h6 .bi.text-warning,
.system-page .card-title .bi.text-warning { color: var(--blue) !important; }

/* 卡片 */
.system-page .card-fashion {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(11,31,58,.05);
  color: var(--ink);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.system-page .card-fashion:hover {
  border-color: #b9c9da;
  box-shadow: var(--shadow);
}
.system-page .card-fashion:has(table):hover { box-shadow: 0 10px 30px rgba(11,31,58,.05); border-color: var(--line); }
.system-page .card-sage {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 55px rgba(11,31,58,.16);
}
.system-page .card-sage h1, .system-page .card-sage h2, .system-page .card-sage h3,
.system-page .card-sage h4, .system-page .card-sage h5, .system-page .card-sage h6 { color: #fff !important; }
.system-page .card-sage .text-muted, .system-page .card-sage .text-secondary,
.system-page .card-sage small, .system-page .card-sage li { color: #dce8f5 !important; }
.system-page .card-pebble {
  background: #f3f6fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

/* 頁首橫幅（線上測驗首頁）：與教學網站內頁 Hero 相同的淡藍漸層 */
.system-page .hero-banner {
  background: linear-gradient(120deg,#f7faff,#eef5fb);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 3.5rem 2.75rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.system-page .hero-banner::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -40px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(43,105,166,.14),rgba(43,105,166,0) 68%);
  pointer-events: none;
}
.system-page .hero-banner > * { position: relative; z-index: 1; }

/* 標籤：改成教學網站的英文小標（section-kicker）樣式 */
.system-page .badge-organic {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #b9c9da;
  color: var(--navy);
  font-weight: 800;
  font-size: .78rem;
  padding: .3rem .8rem;
  border-radius: 999px;
}
.system-page .handwrite-badge,
.system-page .handwrite-note {
  font-family: inherit;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  transform: none;
}
.system-page .handwrite-badge { display: block; margin-top: .6rem; }

/* 按鈕 */
.system-page .btn-cta {
  background: var(--navy) !important;
  border: 1px solid var(--navy) !important;
  color: #fff !important;
  border-radius: 999px;
  font-weight: 800;
  padding: .55rem 1.3rem;
  box-shadow: none;
  transition: background .2s, border-color .2s;
}
.system-page .btn-cta:hover, .system-page .btn-cta:focus-visible {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: #fff !important;
  transform: none;
  box-shadow: none;
}
.system-page .btn-cta:focus-visible { outline: 3px solid rgba(43,105,166,.35); outline-offset: 2px; }
.system-page .btn-cta.btn-sm { padding: .3rem .9rem; }
.system-page .btn-outline-dark {
  border: 1px solid #b9c9da !important;
  color: var(--navy) !important;
  background: #fff;
  border-radius: 999px;
  font-weight: 800;
}
.system-page .btn-outline-dark:hover {
  background: var(--ice) !important;
  color: var(--navy) !important;
}
.system-page .btn-outline-light {
  --bs-btn-color: #44546a;
  --bs-btn-border-color: #b9c9da;
  --bs-btn-hover-color: var(--navy);
  --bs-btn-hover-bg: var(--ice);
  --bs-btn-hover-border-color: var(--blue);
  --bs-btn-active-color: var(--navy);
  --bs-btn-active-bg: var(--ice);
  --bs-btn-active-border-color: var(--blue);
  --bs-btn-disabled-color: var(--muted);
  --bs-btn-disabled-border-color: var(--line);
  border-radius: 999px;
  font-weight: 700;
}

/* 表格 */
.system-page .table { --bs-table-bg: transparent; color: var(--ink); }
.system-page .table-light, .system-page thead.table-light th {
  --bs-table-bg: #f3f7fb;
  background: #f3f7fb !important;
  color: #44546a;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--line);
}
.system-page .table td { border-color: var(--line); }
.system-page .table-hover > tbody > tr:hover > * { --bs-table-hover-bg: #f9fbfd; }
.system-page code { color: var(--blue); background: var(--ice); padding: .05rem .35rem; border-radius: 6px; }

/* 表單 */
.system-page .form-control, .system-page .form-select {
  border-color: #c9d6e3;
  border-radius: 12px;
}
.system-page .form-control:focus, .system-page .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 .2rem rgba(43,105,166,.18);
}
.system-page .form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }

/* 彈出視窗 */
.system-page .modal-content {
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(11,31,58,.18);
}
.system-page .modal.fade .modal-dialog { transition: none; }

/* 連結與登出 */
.system-page .forgot-password-link { color: var(--blue) !important; font-weight: 600; }
.system-page .forgot-password-link:hover { color: var(--navy) !important; text-decoration: underline !important; }
.system-page .dropdown-item.logout-action { color: #dc3545 !important; font-weight: 700; }
.system-page .dropdown-item.logout-action:hover { background: #fff1f2; color: #b42332 !important; }

/* 線上測驗：選擇試卷卡片（版面沿用，顏色改為品牌色系） */
.system-page .exam-category-row { width: 60%; margin-left: auto; margin-right: auto; }
.system-page .exam-category-card {
  --category-color: var(--blue);
  --category-soft: var(--ice);
  border: 1px solid var(--line) !important;
  border-radius: 18px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.system-page .exam-category-amber { --category-color: #2b69a6; }
.system-page .exam-category-rose { --category-color: #163a63; }
.system-page .exam-category-teal { --category-color: #2f7d73; }
.system-page .exam-category-card:hover { border-color: var(--category-color) !important; box-shadow: 0 10px 26px rgba(11,31,58,.08); }
.system-page .exam-category-icon { font-size: 2rem; line-height: 1.2; color: var(--category-color); }
.system-page .exam-category-title { font-size: 1.08rem; line-height: 1.35; min-height: 2.7em; display: flex; align-items: center; justify-content: center; color: var(--navy); }
.system-page .exam-category-card .btn { font-size: .9rem; padding: .45rem .65rem; }
.system-page .exam-final-submit-card { width: 60%; margin-left: auto; margin-right: auto; }
.system-page .exam-final-submit-card .btn { max-width: 100%; white-space: normal; }

/* 會員名冊、課程管理的欄寬 */
.system-page .user-name-role-cell { vertical-align: middle; min-width: 9rem; }
.system-page .user-identity-cell { min-width: 12rem; }
.system-page .course-admin-settings > [class*="col-"] > .card { margin-bottom: 0; }

@media (max-width: 1199.98px) {
  .system-page .exam-category-row, .system-page .exam-final-submit-card { width: 85%; }
}
@media (max-width: 767.98px) {
  .system-page .system-main { padding-top: 96px; }
  .system-page .hero-banner { padding: 2.25rem 1.4rem; border-radius: 22px; }
  .system-page .exam-category-row, .system-page .exam-final-submit-card { width: 100%; }
  .system-page .exam-category-title { min-height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .system-page .card-fashion, .system-page .btn-cta { transition: none; }
}
