/* ============================================================
   pages.css — 共用頁面樣式
   延伸自 style.css 的設計語言（毛玻璃卡片、圓角、柔和陰影、
   青綠→白→綠漸層背景、灰色系文字），供以下三個頁面共用：
   - meetings.html（校務會議資訊）
   - dashboard.html（提案進度儀表板）
   - about.html（關於我們）
   本檔僅新增頁面專屬元件，基礎樣式（header/footer/container/
   modal 等）沿用 style.css。
   ============================================================ */

:root {
  /* 取自 logo 三色：青綠、灰、綠 */
  --brand-teal: #8ec7d8;
  --brand-gray: #c2cad0;
  --brand-green: #9ecb8f;

  /* 提案 / 政見狀態色（柔和飽和度，貼合毛玻璃風格） */
  --st-draft:     #b9c2cb; /* 草擬 / 預備 */
  --st-discuss:   #f0c674; /* 討論 */
  --st-propose:   #8ec7d8; /* 提案 */
  --st-review:    #b79ce0; /* 審議 */
  --st-exec:      #79b6e0; /* 執行 */
  --st-done:      #7fc08a; /* 完結 */
  --st-cancel:    #b9bcbf; /* 取消 */
  --st-fail:      #e08f8f; /* 失敗 */

  /* 類別色 */
  --cat-rights:   #8ec7d8; /* 學權 */
  --cat-academic: #9ecb8f; /* 課務 */
  --cat-grade:    #cb8f8f; /* 成績 */
  --cat-life:     #f0c674; /* 生活 */
  --cat-facility: #b79ce0; /* 設備 */
  --cat-other:    #c2cad0; /* 其他 */
}

/* ---------- 共用：頁面標頭區塊 ---------- */
.page-hero {
  padding-top: 36px;
  padding-bottom: 36px;
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.page-hero h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #727272;
}

h1 img {
    width: 30px;
    height: 30px;
}

.page-hero p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.7;
}

/* 讓 header 的分頁導覽項目有 active 狀態 */
.site-nav a.active {
  opacity: 1;
  font-weight: 700;
}

/* 通用卡片 */
.glass-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(120, 140, 160, 0.12);
}

/* 狀態徽章（進度 / 政見狀態共用） */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

/* 依狀態上色 */
.badge.s-draft   { background: var(--st-draft); }
.badge.s-discuss { background: var(--st-discuss); color:#6a5320; }
.badge.s-propose { background: var(--st-propose); color:#245663; }
.badge.s-review  { background: var(--st-review); }
.badge.s-exec    { background: var(--st-exec); }
.badge.s-done    { background: var(--st-done); }
.badge.s-cancel  { background: var(--st-cancel); }
.badge.s-fail    { background: var(--st-fail); }

/* 類別小標籤（外框樣式，跟狀態徽章區分） */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid var(--tag-c, var(--brand-gray));
  color: var(--tag-c, var(--text-main));
}

.state-loading,
.state-empty,
.state-failed {
  text-align: center;
  font-size: 16px;
  padding: 32px 0;
}
.state-loading { color: var(--text-soft); }
.state-empty   { color: #888; }
.state-failed  { color: rgb(142, 39, 39); }

/* ============================================================
   校務會議資訊（meetings.html）
   ============================================================ */

/* 分頁頁籤 */
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.55);
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tab-btn:hover { transform: translateY(-2px); }
.tab-btn.active {
  background: var(--brand-teal);
  color: #fff;
  box-shadow: 0 8px 20px rgba(120, 160, 150, 0.28);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.28s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 會議摘要列（日期 / 記錄連結） */
.meeting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.meeting-head .m-date {
  font-size: 20px;
  font-weight: 700;
  color: #5f5f5f;
}
.meeting-head .m-date span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  margin-top: 2px;
}
.record-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #4a7a8a;
  background: rgba(142, 199, 216, 0.18);
  padding: 9px 16px;
  border-radius: 12px;
  transition: background 0.2s ease;
}
.record-link:hover { background: rgba(142, 199, 216, 0.32); }

/* 統計數據卡（提案 / 報告 統計） */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
}
.stat-card .num {
  font-size: 30px;
  font-weight: 800;
  color: #566;
  line-height: 1;
}
.stat-card .lbl {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

/* 與會學生代表 */
.reps-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.rep-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  font-size: 14px;
}
.rep-chip .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.rep-chip .grade {
  font-size: 12px;
  color: var(--text-soft);
}

/* 圖表：純 CSS 長條 + 甜甜圈 */
.charts-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
.chart-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: #666;
  margin-bottom: 14px;
}

/* 長條圖 */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr 40px; align-items: center; gap: 10px; }
.bar-row .bar-lbl { font-size: 13px; color: var(--text-soft); }
.bar-track {
  height: 16px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.9s cubic-bezier(.2,.7,.3,1);
}
.bar-row .bar-val { font-size: 13px; font-weight: 700; color: #666; text-align: right; }

/* 甜甜圈圖（提案通過比例） */
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut {
  --pct: 0;
  width: 130px; height: 130px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #ffffffcc 0 66%, transparent 67% 100%),
    conic-gradient(var(--brand-green) calc(var(--pct) * 1%), rgba(180,190,200,0.35) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.donut .donut-num { text-align: center; }
.donut .donut-num b { font-size: 24px; color: #566; }
.donut .donut-num small { display:block; font-size: 12px; color: var(--text-soft); }
.donut-legend { font-size: 13px; color: var(--text-soft); line-height: 2; }
.donut-legend i {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin-right: 7px; vertical-align: middle;
}

/* 提案內容細節列表 */
.proposal-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.proposal-item {
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border-left: 4px solid var(--brand-teal);
}
.proposal-item .p-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.proposal-item .p-title { font-size: 16px; font-weight: 700; color: #555; }
.proposal-item .p-desc { font-size: 14px; line-height: 1.7; color: var(--text-main); }
.proposal-item .p-result { font-size: 13px; color: var(--text-soft); margin-top: 8px; }

.subhead {
  font-size: 15px; font-weight: 700; color: #666;
  margin: 26px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.subhead::before {
  content: ""; width: 5px; height: 18px; border-radius: 3px;
  background: linear-gradient(var(--brand-teal), var(--brand-green));
}

/* ============================================================
   提案進度儀表板（dashboard.html）
   ============================================================ */

.filter-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px;
}
.filter-btn {
  background: rgba(255, 255, 255, 0.55);
  border: none; border-radius: 999px;
  padding: 8px 18px; font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--text-main); cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}
.filter-btn:hover { transform: translateY(-2px); }
.filter-btn.active {
  background: var(--brand-teal);
  color: #fff;
}

.dash-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
  gap: 14px; margin-bottom: 24px;
}

.proposal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.pcard {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(120, 140, 160, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.pcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(120, 140, 160, 0.24);
}
.pcard .pc-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pcard .pc-title { font-size: 18px; font-weight: 700; color: #555; margin-bottom: 6px; }
.pcard .pc-desc { font-size: 14px; line-height: 1.65; color: var(--text-main); margin-bottom: 18px; flex-grow: 1; }

/* 進度條（多段式節點） */
.progress-wrap { margin-top: auto; }
.progress-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.progress-head .p-stage { display:none; font-size: 14px; font-weight: 700; }
.progress-head .p-pct { display:none; align-items: center; font-size: 13px; color: var(--text-soft); }
.progress-track {
  height: 10px; border-radius: 999px;
  background: rgba(255,255,255,0.6);
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  transition: width 0.9s cubic-bezier(.2,.7,.3,1);
}
.progress-steps {
  display: flex; justify-content: space-between; margin-top: 10px;
  font-size: 10px; color: var(--text-soft);
}
.progress-steps span { flex: 1; text-align: center; position: relative; }
.progress-steps span.reached { color: #5a8a6a; font-weight: 700; }

/* ============================================================
   關於我們（about.html）
   ============================================================ */

.rep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}
.rep-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 22px rgba(120, 140, 160, 0.16);
}
.rep-card .rep-top {
  display: flex; align-items: center; gap: 18px; margin-bottom: 18px;
}
.rep-photo {
  width: 92px; height: 92px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-green));
  border: 3px solid rgba(255,255,255,0.7);
  box-shadow: 0 6px 16px rgba(120,140,160,0.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 30px; font-weight: 700;
}
.rep-card .rep-name { font-size: 22px; font-weight: 700; color: #555; }
.rep-card .rep-role { font-size: 14px; color: var(--text-soft); margin-top: 3px; }
.rep-card .rep-bio { font-size: 14px; line-height: 1.8; color: var(--text-main); margin-bottom: 22px; }

.rep-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.rep-links a {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 13px; font-weight: 600;
  color: #4a7a8a; background: rgba(142,199,216,0.18);
  padding: 8px 14px; border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.rep-links a:hover { background: rgba(142,199,216,0.34); transform: translateY(-2px); }

.pledge-list { display: flex; flex-direction: column; gap: 12px; }
.pledge {
  background: rgba(255,255,255,0.55);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.pledge .pl-text { font-size: 14px; line-height: 1.6; color: var(--text-main); }
.pledge .pl-text b { font-weight: 700; color: #555; display:block; margin-bottom: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .charts-row { grid-template-columns: 1fr; }
  .page-hero { padding: 24px 22px; }
  .page-hero h1 { font-size: 23px; }
  .bar-row { grid-template-columns: 70px 1fr 34px; }
}
