/* DYSH 課表查詢系統 — 淺藍色系 */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, -apple-system, sans-serif;
  background: #f0f6fc; color: #23384a; line-height: 1.5;
}
a { color: #2e86c1; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 頂列 */
.ct-top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, #5dade2 0%, #2e86c1 100%);
  color: #fff; padding: 12px 20px; box-shadow: 0 2px 8px rgba(46,134,193,.25);
}
.ct-brand { color: #fff; font-weight: 800; font-size: 19px; letter-spacing: .5px; }
.ct-brand:hover { text-decoration: none; opacity: .92; }
.ct-nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
.ct-nav a { color: #e3f1fb; font-size: 14.5px; padding: 2px 0; border-bottom: 2px solid transparent; }
.ct-nav a:hover { color: #fff; border-bottom-color: #fff; text-decoration: none; }
.ct-nav .ct-admin-link { color: #fff3cd; font-weight: 600; }
.ct-who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #e3f1fb; }
.ct-logout { color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: 3px 12px; }
.ct-logout:hover { background: rgba(255,255,255,.18); text-decoration: none; }

.ct-main { max-width: 1120px; margin: 22px auto; padding: 0 16px; }
.ct-foot { text-align: center; color: #9db4c6; font-size: 12px; padding: 24px; }

/* 卡片 / 面板 */
.ct-card {
  background: #fff; border: 1px solid #dceaf5; border-radius: 14px;
  padding: 18px 22px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(46,134,193,.06);
}
.ct-card h2 { margin: 0 0 12px; font-size: 17px; color: #1c5a8f; }
.ct-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.ct-field label { display: block; font-size: 12px; color: #6b8598; margin-bottom: 4px; }
select, input[type=text], input[type=file] {
  padding: 8px 10px; border: 1.5px solid #cfe0ee; border-radius: 8px; font-size: 14px; background: #fff;
}
select:focus, input:focus { outline: none; border-color: #2e86c1; box-shadow: 0 0 0 3px rgba(46,134,193,.12); }
.ct-btn {
  display: inline-block; padding: 9px 20px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, #5dade2, #2e86c1); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: 0 3px 10px rgba(46,134,193,.3);
}
.ct-btn:hover { transform: translateY(-1px); text-decoration: none; }
.ct-btn.ghost { background: #e8f2fb; color: #2e86c1; box-shadow: none; }

.ct-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ct-tile { display: block; background: #fff; border: 1px solid #dceaf5; border-radius: 14px; padding: 18px; }
.ct-tile:hover { border-color: #2e86c1; text-decoration: none; box-shadow: 0 4px 14px rgba(46,134,193,.16); }
.ct-tile .ico { font-size: 26px; }
.ct-tile .t { font-weight: 700; margin-top: 6px; color: #23384a; }
.ct-tile .d { font-size: 13px; color: #6b8598; margin-top: 2px; }

.ct-msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.ct-msg.ok { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.ct-msg.err { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.ct-msg.info { background: #e8f4fd; color: #1c5a8f; border: 1px solid #bfe0f5; }

/* 課表 */
.ct-tt-wrap { overflow-x: auto; }
.ct-tt { width: 100%; border-collapse: collapse; background: #fff; min-width: 760px; }
.ct-tt th, .ct-tt td { border: 1px solid #dceaf5; vertical-align: top; padding: 4px; text-align: center; }
.ct-tt thead th { background: linear-gradient(135deg, #5dade2, #2e86c1); color: #fff; padding: 8px; font-size: 14px; }
.ct-tt th.ct-p { background: #e8f2fb; color: #1c5a8f; width: 84px; font-size: 12.5px; white-space: nowrap; line-height: 1.35; }
.ct-tt th.ct-p .ct-time { display: block; color: #6b8ea8; font-size: 11px; font-weight: 400; margin-top: 2px; }
.ct-tt td { width: 18%; height: 56px; }
.ct-cell { border-radius: 6px; padding: 4px 5px; margin: 2px 0; font-size: 13px; }
.ct-cell .ct-l1 { font-weight: 600; }
.ct-cell .ct-l2 { color: #52697b; font-size: 12px; }
.ct-cell .ct-l3 { color: #9db4c6; font-size: 11px; }
.ct-ln { background: #eef6fd; }   /* 一般課 */
.ct-la { background: #fff3e0; }   /* 團體活動 / 自主學習 */
.ct-lm { background: #f0ebfa; }   /* 會議 / 領域 */
.ct-cell.ct-hl { background: #ffb74d; border: 2px solid #ef6c00; box-shadow: 0 0 0 1px #ef6c00 inset; }
a.ct-cell.ct-click { display: block; text-decoration: none; color: inherit; cursor: pointer; }
a.ct-cell.ct-click:hover { background: #ffa726; box-shadow: 0 0 0 2px #e65100 inset; }
/* 課表交叉連結（教師/班級/教室互跳） */
.ct-cell a { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(46,134,193,.6); }
.ct-cell a:hover { color: #2e86c1; border-bottom: 1px solid #2e86c1; background: rgba(93,173,226,.14); border-radius: 2px; }
.ct-noon th.ct-p { background: #f3e6cf; color: #8a6d3b; }
.ct-noon td { background: #fbf6ee; color: #8a6d3b; font-size: 13px; height: auto; padding: 10px; text-align: center; letter-spacing: .5px; }

/* 教師鐘點統計 */
.ct-hours { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; margin-top: 6px; }
.ct-hours .hi { color: #52697b; }
.ct-hours .hi b { color: #2e86c1; font-weight: 700; }
.ct-hours .total { font-weight: 700; color: #1c5a8f; }

/* 有空老師 / 可調課 老師 — 可點擊磚 */
.ct-teacher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ct-tchip { display: block; background: #eef6fd; border: 1px solid #cfe0ee; border-radius: 10px; padding: 10px 12px; text-align: center; }
.ct-tchip:hover { border-color: #2e86c1; background: #e0f0fc; text-decoration: none; box-shadow: 0 2px 8px rgba(46,134,193,.15); }
.ct-tchip .n { font-weight: 700; color: #1c5a8f; }
.ct-tchip .c { font-size: 12px; color: #6b8598; }
.ct-tchip .s { font-size: 12px; color: #52697b; margin-top: 2px; }

table.ct-list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.ct-list th, table.ct-list td { border-bottom: 1px solid #dceaf5; padding: 8px 10px; text-align: left; }
table.ct-list th { color: #6b8598; font-weight: 600; background: #f4f9fd; }

/* 登入頁（卡片式，淺藍） */
.ct-login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5dade2 0%, #2e86c1 100%); padding: 24px; }
.login-wrap { width: 100%; max-width: 440px; }
.login-card { background: #fff; border-radius: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.28); overflow: hidden; }
.lc-head { background: linear-gradient(135deg, #5dade2, #2e86c1); color: #fff; padding: 38px 30px; text-align: center; }
.lc-head .ico { font-size: 40px; }
.lc-head h1 { font-size: 30px; font-weight: 600; letter-spacing: 1px; margin: 6px 0 0; }
.lc-head h1 b { font-weight: 800; }
.lc-head .sub { margin-top: 6px; font-size: 14px; opacity: .9; }
.lc-body { padding: 32px 30px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px; border: 2px solid #e0e0e0; border-radius: 10px; text-decoration: none; color: #333; font-size: 15px; }
.btn-google:hover { border-color: #2e86c1; text-decoration: none; }
.g-logo { width: 20px; height: 20px; }
.note { margin-top: 10px; text-align: center; color: #aaa; font-size: 12px; }

@media (max-width: 640px) {
  .ct-top { gap: 10px; }
  .ct-nav { order: 3; width: 100%; }
}
