/* ═══════════════════════════════════════════════════════════════════════════
   Theme chuẩn trường — ĐH Kiến trúc Đà Nẵng
   Maroon #990000 · navbar #5c0000 · gold #fbae40 · nền sáng.
   Nạp SAU <style> inline của mỗi trang; !important để phủ cả style JS chèn.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Thanh điều hướng: maroon + viền vàng, ĐỒNG BỘ chiều cao mọi trang ── */
/* Trang cũ đặt 44px, trang mới 52px → ép về 52px để hết "nhảy" khi chuyển trang */
.topnav {
  background: #5c0000 !important;
  border-bottom: 3px solid #fbae40 !important;
  height: 52px !important;
  padding: 0 20px !important;
  align-items: center !important;
}
.topnav .brand { color: #fff !important; font-size: 13px !important; margin-right: 24px !important; align-self: center !important; }
/* nav-link GIÃN theo chiều cao topnav (không ép 52px cứng để tránh tràn dọc do border-box) */
.nav-link {
  color: rgba(255,255,255,.82) !important;
  align-self: stretch !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  gap: 6px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  border-bottom-width: 3px !important;
  border-bottom-style: solid !important;
  border-bottom-color: transparent !important;
}
.nav-link:hover { color: #fbae40 !important; }
.nav-link.active {
  color: #fff !important;
  border-bottom-color: #fbae40 !important;
}
/* Chống vỡ: nav không co/xuống dòng — nếu quá dài thì cuộn ngang, ẩn thanh cuộn */
.topnav { overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none !important; -ms-overflow-style: none !important; }
.topnav::-webkit-scrollbar { display: none !important; height: 0 !important; }
.topnav .brand, .topnav .nav-link, .topnav .ws-switcher, .topnav .ws-user { flex-shrink: 0 !important; }
.brand-txt { white-space: nowrap; }

/* ── Đồng bộ bề rộng khung nội dung (hết "nhảy" ngang) ── */
#sidebar { width: 270px !important; }                 /* trang CSGD: 240/280/300 → 270 */
.main { max-width: 1300px !important; padding: 20px !important; } /* trang CTĐT: 1100/1300/1400 → 1300 */

/* ── Workspace switcher + user trên nền maroon ── */
.ws-switcher .ws-label { color: rgba(255,255,255,.75) !important; }
.ws-switcher select {
  background: #fff !important; color: #1c1e21 !important;
  border-color: #8a3a3a !important;
}
.ws-switcher select:hover { border-color: #fbae40 !important; }
.ws-switcher button, .ws-user button {
  color: rgba(255,255,255,.85) !important;
  border-color: rgba(255,255,255,.4) !important;
  background: transparent !important;
}
.ws-switcher button:hover, .ws-user button:hover {
  color: #fbae40 !important; border-color: #fbae40 !important;
}
.ws-user { border-left-color: rgba(255,255,255,.28) !important; }
.ws-user-name { color: #fff !important; }
.ws-switcher .ws-badge { background: #fbae40 !important; color: #5c0000 !important; }
.ws-switcher .ws-badge.ctdt { background: #fff !important; color: #5c0000 !important; }

/* ── Nhấn nhá thương hiệu cho nội dung ── */
h1 { color: #5c0000; }
::selection { background: rgba(251,174,64,.35); }

/* ── Bảng màu nền dùng chung ────────────────────────────────────────────────
   Trước đây 15 trang khai --bg:#eef1f4 / --muted:#64748b, 2-3 trang lại khai
   --bg:#f5f6f8 / --muted:#606770 / --border:#dadde1, nên chuyển trang thấy nền
   và chữ phụ đổi sắc. Tệp này nạp SAU <style> của trang nên khai lại ở đây là
   đủ để thống nhất, không cần sửa 15 tệp.
   --muted cũ #64748b trên nền trắng chỉ đạt 4,2:1, dưới ngưỡng AA 4,5:1 cho
   chữ nhỏ; #4b5563 đạt 8,0:1 mà vẫn giữ đúng vai trò chữ phụ. */
:root {
  --bg:     #eef1f4;
  --panel:  #ffffff;
  --border: #d9dce1;
  --hover:  #eef1f4;
  --muted:  #4b5563;
}
/* Trang nào đặt font khác thì kéo về một ngăn xếp duy nhất, tránh chữ đổi dáng
   giữa các trang (trước đây 'Segoe UI' vs system-ui đứng đầu ở hai nhóm trang). */
body { font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; }

/* ── Footer dùng chung, do workspace-switcher.js chèn vào mọi trang ─────────
   Là flex item cuối của body (mọi trang đều để body là cột flex) nên nó nằm
   đáy nội dung, không đè lên vùng đang cuộn. flex-shrink:0 để trang nào khoá
   chiều cao 100vh cũng không bóp mất nó. */
.kdcl-footer {
  flex-shrink: 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px 18px;
  padding: 8px 20px;
  background: #fff;
  border-top: 2px solid #fbae40;
  color: #4b5563; font-size: 11px; line-height: 1.5;
}
.kdcl-footer .kf-left { font-weight: 600; color: #5c0000; }
.kdcl-footer a { color: #990000; text-decoration: none; }
.kdcl-footer a:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .kdcl-footer { justify-content: flex-start; }
}
