/* =========================================================
   呂宇健教育慈善基金會 — 網站設計系統 (Design System)
   注意：本檔為框架階段樣式，設計細節可後續調整
   ========================================================= */

:root {
  /* 品牌色 — 深藍 / 淺藍 / 天空藍 */
  --brand: #15396b;
  --brand-dark: #0f2a4f;
  --brand-light: #e3ecf7;
  --accent: #4aa8e0;
  --accent-dark: #2e87c4;
  --accent-soft: #e6f2fb;

  /* 中性色 */
  --bg: #f3f8fc;
  --bg-alt: #e9f1f9;
  --surface: #ffffff;
  --text: #1f2a2e;
  --text-soft: #56636a;
  --text-mute: #8a969c;
  --border: #e1e8e5;
  --border-strong: #cdd8d3;

  /* 狀態色 */
  --success: #2e9e6b;
  --warning: #e0a800;
  --danger: #d9534f;
  --info: #2f80c2;

  /* 字型與圓角 */
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(21, 57, 107, 0.10);
  --shadow-sm: 0 2px 10px rgba(21, 57, 107, 0.07);
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; transition: color .18s; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; color: var(--text); margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 20px; }

p { margin: 0 0 1em; }

/* 容器 */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 880px; }

/* =========================================================
   頂部公告條
   ========================================================= */
.topbar {
  background: var(--brand-dark);
  color: #eafff5;
  font-size: 13px;
  text-align: center;
  padding: 7px 16px;
}
.topbar a { color: var(--accent); }

/* =========================================================
   頂部導航 (Header)
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 42px; height: 42px; flex: 0 0 auto; object-fit: contain; display: block; }
.brand .name { font-weight: 800; font-size: 18px; color: var(--brand-dark); line-height: 1.15; white-space: nowrap; }
.brand .name small { display: block; font-weight: 500; font-size: 11px; color: var(--text-mute); letter-spacing: .5px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; flex-shrink: 0; }
.nav-links > li > a {
  display: block;
  padding: 10px 14px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-links > li > a:hover, .nav-links > li.active > a { color: var(--brand); background: var(--brand-light); }

/* 下拉選單 */
.nav-links li.has-sub:hover > .submenu { display: block; }
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 60;
}
.submenu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text-soft); font-weight: 500; }
.submenu a:hover { background: var(--brand-light); color: var(--brand); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* 漢堡選單 */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* =========================================================
   按鈕
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s, box-shadow .18s, background .18s, color .18s;
  font-family: inherit;
  line-height: 1;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(31,122,90,.28); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #0f2a4f; box-shadow: 0 6px 16px rgba(74,168,224,.3); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--brand); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }

/* =========================================================
   區塊 / 標題
   ========================================================= */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head p { color: var(--text-soft); }
.section-head.left { text-align: left; margin-left: 0; }

/* 頁面橫幅 (Page Hero) */
.page-hero {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 640px; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 12px; }
.breadcrumb a { color: rgba(255,255,255,.9); }

/* =========================================================
   卡片
   ========================================================= */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand);
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 15px; margin-bottom: 0; }
.card-link { margin-top: 16px; font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }

/* 首頁 Hero */
.hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 55%, #2e87c4 100%);
  color: #fff;
  padding: 84px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 12% 20%, rgba(255,255,255,.12) 0, transparent 35%),
                    radial-gradient(circle at 88% 80%, rgba(255,255,255,.10) 0, transparent 30%);
}
.hero .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero .tagline { font-size: 19px; color: rgba(255,255,255,.9); margin: 18px 0 8px; font-weight: 600; }
.hero .lead { color: rgba(255,255,255,.82); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-actions .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.hero-actions .btn-outline:hover { background: #fff; color: var(--brand); }

/* 首頁 Hero 活動花絮幻燈片 */
.hero-slides {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--brand-dark);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 22px 55px rgba(8,23,46,.38);
}
.hero-slides .slide-badge {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  background: rgba(21,57,107,.85); color: #fff;
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  letter-spacing: .5px;
}
.hero-slides .slide-track { display: flex; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.hero-slides .slide { flex: 0 0 100%; }
.hero-slides .slide img { display: block; width: 100%; height: 400px; object-fit: cover; }
.hero-slides .slide-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 34px 22px 20px;
  background: linear-gradient(transparent, rgba(8,23,46,.78));
  color: #fff;
}
.hero-slides .slide-caption h4 { margin: 0 0 4px; font-size: 18px; color: #fff; }
.hero-slides .slide-caption a { color: #bfe0f7; font-size: 13px; text-decoration: none; }
.hero-slides .slide-caption a:hover { color: #fff; text-decoration: underline; }
.hero-slides .slide-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.88); color: var(--brand-dark);
  font-size: 24px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.22); transition: background .2s;
}
.hero-slides .slide-arrow:hover { background: #fff; }
.hero-slides .slide-arrow.prev { left: 12px; }
.hero-slides .slide-arrow.next { right: 12px; }
.hero-slides .slide-dots {
  position: absolute; bottom: 16px; right: 18px; z-index: 3;
  display: flex; gap: 8px;
}
.hero-slides .slide-dots .dot {
  width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.55); transition: all .25s;
}
.hero-slides .slide-dots .dot.active { background: #fff; width: 26px; border-radius: 6px; }

/* 數據統計 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat .num { font-size: 34px; font-weight: 800; color: var(--brand); line-height: 1; }
.stat .num .unit { font-size: 16px; font-weight: 700; color: var(--text-soft); margin-left: 4px; }
.stat .label { margin-top: 8px; color: var(--text-soft); font-size: 14px; }

/* 首頁公告列表 */
.notice-list { display: grid; gap: 14px; }
.notice-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; transition: border-color .15s, box-shadow .15s;
}
.notice-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.notice-date { flex: 0 0 auto; text-align: center; background: var(--brand-light); color: var(--brand); border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 13px; min-width: 56px; }
.notice-date .d { display: block; font-size: 18px; }
.notice-body h4 { margin: 0 0 4px; font-size: 16px; }
.notice-body p { margin: 0; color: var(--text-soft); font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-right: 8px; }
.tag-news { background: #e7f0fb; color: var(--info); }
.tag-course { background: var(--accent-soft); color: var(--accent-dark); }
.tag-fund { background: #e6f2fb; color: var(--success); }

/* 快捷操作 */
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quick {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; transition: transform .15s, box-shadow .18s;
}
.quick:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quick .qicon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; }
.quick h4 { margin: 0 0 4px; font-size: 17px; }
.quick p { margin: 0; font-size: 13px; color: var(--text-soft); }

/* 圖片佔位 (無外部圖片依賴) */
.img-ph {
  background: linear-gradient(135deg, var(--brand-light), #d8ece3);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--brand);
  font-weight: 700;
  min-height: 200px;
  border: 1px dashed var(--border-strong);
  position: relative;
  overflow: hidden;
}
.img-ph.dark { background: linear-gradient(135deg, var(--brand-dark), #2e87c4); color: rgba(255,255,255,.85); }
.img-ph .ph-cap { font-size: 14px; letter-spacing: 1px; opacity: .8; }
.img-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 雙欄佈局 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.reverse > .split-media { order: -1; }

/* 清單 (勾選) */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .ck { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 13px; margin-top: 2px; }

/* 步驟 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; }
.step .n { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.step h4 { margin: 0 0 6px; }
.step p { margin: 0; font-size: 14px; color: var(--text-soft); }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: var(--bg-alt); font-weight: 700; color: var(--text-soft); white-space: nowrap; }
table.data tbody tr:hover { background: var(--brand-light); }
table.data tbody tr:last-child td { border-bottom: 0; }

/* 徽章 */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-green { background: #e6f2fb; color: var(--success); }
.badge-amber { background: var(--accent-soft); color: var(--accent-dark); }
.badge-red { background: #fbeaea; color: var(--danger); }
.badge-gray { background: #eef1f0; color: var(--text-soft); }
.badge-blue { background: #e7f0fb; color: var(--info); }

/* 付款方式 */
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pay-grid.centered-payments { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin: 0 auto; }
.pay {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.pay .picon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; font-weight: 800; }
.pay h4 { margin: 0 0 2px; font-size: 15px; }
.pay p { margin: 0; font-size: 13px; color: var(--text-soft); }

/* 表單 */
.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 15px; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light);
}
.field textarea { resize: vertical; min-height: 110px; }
.field .hint { font-size: 12px; color: var(--text-mute); margin-top: 5px; }
.file-drop {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 22px; text-align: center; color: var(--text-soft); cursor: pointer; background: var(--bg);
}
.file-drop:hover { border-color: var(--brand); color: var(--brand); }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 18px 20px; font-weight: 700; font-size: 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: inherit; color: var(--text); }
.faq-q .ic { transition: transform .2s; color: var(--brand); flex: 0 0 auto; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a .inner { padding: 0 20px 18px; color: var(--text-soft); }

/* 資訊盒 */
.info-box { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 18px 20px; color: #5a4600; }
.info-box.brand { background: var(--brand-light); border-left-color: var(--brand); color: var(--brand-dark); }

/* 聯絡資訊 */
.contact-info { display: grid; gap: 14px; }
.contact-info .ci { display: flex; gap: 14px; align-items: flex-start; }
.contact-info .ci .cicon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.contact-info .ci h4 { margin: 0 0 2px; font-size: 15px; }
.contact-info .ci p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* 頁尾 */
.site-footer { background: #0f2a4f; color: #cfe0f2; margin-top: 0; }
.footer-top { padding: 56px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid a { color: #bcd2ea; display: block; padding: 5px 0; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-about p { color: #a9c4e0; font-size: 14px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.footer-social a:hover { background: var(--brand); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 13px; color: #9bb6d6; }
.footer-bottom .links a { color: #9bb6d6; margin-left: 18px; }
.footer-bottom .links a:hover { color: #fff; }

/* 浮動捐款按鈕 */
.float-donate {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  background: var(--accent); color: #0f2a4f; font-weight: 800;
  padding: 14px 22px; border-radius: 999px; box-shadow: 0 8px 24px rgba(74,168,224,.4);
  display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font-family: inherit; font-size: 15px;
}
.float-donate:hover { background: var(--accent-dark); color: #fff; }

/* =========================================================
   後台管理系統 (Admin)
   ========================================================= */
.admin-login {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-dark), #2e87c4);
  padding: 20px;
}
.login-card { background: #fff; border-radius: 18px; padding: 40px; width: 100%; max-width: 400px; box-shadow: var(--shadow); }
.login-card .brand { justify-content: center; margin-bottom: 8px; }
.login-card h2 { text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--text-soft); font-size: 14px; margin-bottom: 24px; }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: #0f2a4f; color: #cfe0f2; display: flex; flex-direction: column; }
.sidebar .sb-brand { padding: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .sb-brand .logo { width: 34px; height: 34px; object-fit: contain; display: block; }
.sidebar .sb-brand .name { font-weight: 800; color: #fff; font-size: 15px; line-height: 1.1; }
.sidebar .sb-brand .name small { display: block; font-size: 10px; color: #9bb6d6; letter-spacing: .5px; }
.sb-nav { padding: 12px; flex: 1; overflow-y: auto; }
.sb-group { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #7e9ec4; padding: 14px 12px 6px; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #bcd2ea; font-weight: 600; font-size: 14px; cursor: pointer; margin-bottom: 2px; }
.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-link.active { background: var(--brand); color: #fff; }
.sb-link .si { width: 18px; height: 18px; flex: 0 0 auto; }
.sb-user { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.sb-user .av { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #0f2a4f; display: grid; place-items: center; font-weight: 800; }
.sb-user .meta { line-height: 1.2; }
.sb-user .meta .nm { color: #fff; font-weight: 700; font-size: 14px; }
.sb-user .meta .rl { color: #9bb6d6; font-size: 12px; }

.admin-main { display: flex; flex-direction: column; background: var(--bg); }
.admin-topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.admin-topbar .pg-title { font-weight: 800; font-size: 18px; }
.admin-topbar .pg-actions { display: flex; gap: 10px; align-items: center; }
.admin-content { padding: 28px 24px; flex: 1; overflow-y: auto; }
.admin-section { display: none; }
.admin-section.active { display: block; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-label { color: var(--text-soft); font-size: 13px; font-weight: 600; }
.kpi .k-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.kpi .k-num { font-size: 28px; font-weight: 800; color: var(--text); margin-top: 8px; }
.kpi .k-sub { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.panel-head h3 { margin: 0; font-size: 16px; }
.panel-body { padding: 18px 22px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 200px; }
.toolbar input, .toolbar select { padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tabs .ft { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.filter-tabs .ft.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .ml-name { font-weight: 600; }
.mini-list .ml-sub { color: var(--text-mute); font-size: 12px; }

.bar-chart { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 60px; align-items: center; gap: 12px; font-size: 14px; }
.bar-row .bar { height: 14px; background: linear-gradient(90deg, var(--brand), #2e87c4); border-radius: 999px; }

/* 響應式 */
@media (max-width: 1180px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px; box-shadow: var(--shadow); border-top: 1px solid var(--border); z-index: 90; }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: 12px; }
  .submenu { position: static; box-shadow: none; border: 0; padding-left: 16px; display: none; }
  .nav-links li.has-sub.open > .submenu { display: block; }
  .nav-toggle { display: block; }
}
@media (max-width: 980px) {
  .hero-grid, .split, .two-col { grid-template-columns: 1fr; }
  .split.reverse > .split-media { order: 0; }
  .stats, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4, .quick-actions, .pay-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 100; width: 250px; transform: translateX(-100%); transition: transform .25s; height: 100vh; }
  .sidebar.open { transform: translateX(0); }
  .admin-main { grid-column: 1; }
}
@media (max-width: 640px) {
  .pay-grid.centered-payments { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px; box-shadow: var(--shadow); border-top: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: 12px; }
  .submenu { position: static; box-shadow: none; border: 0; padding-left: 16px; display: none; }
  .nav-links li.has-sub.open > .submenu { display: block; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4, .quick-actions, .pay-grid, .steps, .stats, .kpi-grid, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 56px 0 64px; }
  .hero-slides .slide img { height: 260px; }
  .hero-slides .slide-arrow { width: 36px; height: 36px; font-size: 20px; }
  .brand .name { font-size: 15px; }
  .brand .name small { font-size: 9px; }
}

/* =========================================================
   2026 整站改版：依 UI 參考圖統一為深藍、暖米白、慈善紅
   ========================================================= */
:root {
  --brand: #0b3158;
  --brand-dark: #071f3b;
  --brand-light: #edf2f6;
  --accent: #df2d35;
  --accent-dark: #bd2029;
  --accent-soft: #fff0ed;
  --bg: #fbfaf4;
  --bg-alt: #f4f0e5;
  --surface: #ffffff;
  --text: #182737;
  --text-soft: #536171;
  --text-mute: #798694;
  --border: #e7e2d6;
  --border-strong: #d8d1c2;
  --success: #287a55;
  --warning: #9b6b14;
  --danger: #c72a33;
  --info: #174f82;
  --gold: #c5964f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(11, 49, 88, .12);
  --shadow-sm: 0 7px 24px rgba(11, 49, 88, .075);
  --maxw: 1180px;
}

body { background: var(--bg); color: var(--text); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image: radial-gradient(circle at 12% 8%, rgba(197,150,79,.10), transparent 25%), radial-gradient(circle at 88% 26%, rgba(223,45,53,.06), transparent 22%);
  z-index: -1;
}

.skip-link { position: fixed; left: 18px; top: -80px; z-index: 999; background: #fff; color: var(--brand); padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { top: 16px; }
.topbar { background: #f2ead8; color: var(--brand); padding: 7px 16px; font-weight: 700; letter-spacing: .02em; }
.topbar span { color: var(--text-soft); font-weight: 500; }

.site-header { background: rgba(7,31,59,.98); border-bottom: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(14px); }
.nav { height: 76px; }
.brand .logo { width: 50px; height: 50px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 0 1px rgba(197,150,79,.55); }
.brand .name { color: #fff; font-size: 17px; }
.brand .name small { color: #c9d5e0; font-size: 10px; }
.nav-links { gap: 2px; }
.nav-links > li > a { color: #e7edf3; background: transparent; border-radius: 0; padding: 27px 13px 23px; border-bottom: 3px solid transparent; font-size: 14px; }
.nav-links > li > a:hover, .nav-links > li.active > a { color: #fff; background: rgba(255,255,255,.06); border-bottom-color: var(--accent); }
.submenu { top: calc(100% - 1px); background: #fffef9; border-color: var(--border); }
.submenu a:hover { color: var(--accent-dark); background: var(--accent-soft); }
.admin-link { color: #c9d5e0; font-size: 12px; font-weight: 700; white-space: nowrap; }
.admin-link:hover { color: #fff; }
.nav-toggle span { background: #fff; }

.btn { border-radius: 9px; min-height: 42px; letter-spacing: .01em; }
.btn-primary, .btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(223,45,53,.2); }
.btn-primary:hover, .btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-ghost { color: var(--brand); }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(223,45,53,.32); outline-offset: 3px; }

.section { padding: 76px 0; }
.section-alt { background: linear-gradient(180deg, #f4f0e5, #f8f5ec); }
.section-head { margin-bottom: 38px; }
.section > .container > .section-head:not(:first-child) { margin-top: 76px; }
.section > .container > .info-box, .section > .container > .btn, .section > .container > .card { margin-top: 28px; }
.section-head .eyebrow { color: var(--accent); letter-spacing: .16em; }
.section-head h2::after { content: ""; display: block; width: 46px; height: 3px; margin: 14px auto 0; background: var(--accent); border-radius: 99px; }
.section-head.left h2::after { margin-left: 0; }

.page-hero { background: linear-gradient(105deg, #fbfaf4 0%, #f5efdf 72%, #f9f5eb 100%); color: var(--text); padding: 58px 0 64px; border-bottom: 1px solid var(--border); }
.page-hero::before { content: ""; position: absolute; right: 8%; top: 20%; width: 130px; height: 100px; border: 2px solid rgba(223,45,53,.08); border-radius: 50% 50% 44% 56%; transform: rotate(-9deg); }
.page-hero::after { background: radial-gradient(circle, rgba(197,150,79,.16), transparent 68%); }
.page-hero h1 { color: var(--brand); font-size: clamp(32px,5vw,50px); }
.page-hero p { color: var(--text-soft); font-size: 17px; }
.breadcrumb, .breadcrumb a { color: var(--accent-dark); }

.hero { background: linear-gradient(105deg, #fbfaf4 0%, #f8f2e4 68%, #f4ead5 100%); color: var(--text); padding: 72px 0 82px; border-bottom: 1px solid var(--border); }
.hero::before { background-image: radial-gradient(circle at 15% 18%, rgba(197,150,79,.16), transparent 34%), radial-gradient(circle at 90% 75%, rgba(223,45,53,.08), transparent 30%); }
.hero-grid { grid-template-columns: 1.05fr .95fr; gap: 42px; }
.hero h1 { color: var(--brand); font-size: clamp(34px,4vw,50px); letter-spacing: -.035em; white-space: nowrap; }
.hero .tagline { color: var(--accent); font-size: 15px; letter-spacing: .12em; font-weight: 800; }
.hero .lead { color: var(--text-soft); font-size: 18px; max-width: 38em; }
.hero .hero-actions .btn-outline { color: var(--accent); border-color: var(--accent); background: transparent; }
.hero .hero-actions .btn-outline:hover { color: #fff; background: var(--accent); }
.hero-slides { border-radius: 22px; background: var(--brand-dark); border: 7px solid #fff; box-shadow: 0 24px 64px rgba(11,49,88,.20); }
.hero-slides .slide img { height: 410px; }
.hero-slides .slide-badge { background: var(--accent); }
.hero-slides .slide-caption a { color: #fff; }

.card, .stat, .quick, .pay, .form-card, .faq-item, .notice-item, .step, .table-wrap { border-color: var(--border); box-shadow: var(--shadow-sm); }
.card, .stat, .quick, .pay, .form-card, .faq-item, .notice-item, .step { background: rgba(255,255,255,.94); }
.card:hover, .quick:hover, .notice-item:hover { border-color: rgba(223,45,53,.35); box-shadow: var(--shadow); }
.card .icon, .quick .qicon, .pay .picon, .contact-info .ci .cicon { background: var(--accent-soft) !important; color: var(--accent) !important; }
.card-link { color: var(--accent); }
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.stat .num { color: var(--brand); }
.notice-date { background: var(--accent-soft); color: var(--accent-dark); }
.tag-fund, .tag-course { background: var(--accent-soft); color: var(--accent-dark); }
.quick { border-top: 3px solid var(--accent); }

.field label { color: var(--brand); }
.field input, .field select, .field textarea { background: #fffefb; border: 1px solid var(--border-strong); min-height: 46px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b8ad99; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(223,45,53,.10); }
.file-drop { background: #fffaf7; border-color: #d8c7b2; }
.file-drop:hover { border-color: var(--accent); color: var(--accent-dark); }
.form-card { padding: clamp(24px,4vw,42px); }
.form-section-title { display:flex; align-items:center; gap:12px; padding-bottom:10px; border-bottom:1px solid var(--border); margin: 10px 0 2px; }
.form-section-title .step-no { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; background:var(--brand); color:#fff; font-size:13px; }
.form-message { display:none; margin-top:4px; }
.form-message.show { display:block; }
.info-box { background: #fff7e8; border-left-color: var(--gold); color: #5a4a2e; }
.info-box.brand { background: var(--accent-soft); border-left-color: var(--accent); color: #6a252a; }

.gallery-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.gallery-card { margin:0; border-radius:var(--radius); overflow:hidden; background:#fff; border:1px solid var(--border); box-shadow:var(--shadow-sm); cursor:pointer; }
.gallery-card img { width:100%; aspect-ratio:4/3; object-fit:cover; transition:transform .35s ease; }
.gallery-card:hover img { transform:scale(1.035); }
.gallery-card figcaption { padding:16px 18px 18px; }
.gallery-card strong { display:block; color:var(--brand); margin-bottom:4px; }
.gallery-card span { color:var(--text-soft); font-size:13px; }
.activity-block + .activity-block { margin-top:72px; padding-top:56px; border-top:1px solid var(--border); }
.activity-heading { max-width:780px; margin-left:auto; margin-right:auto; }
.activity-meta { color:var(--brand); font-weight:700; }
.empty-state { max-width:760px; margin:0 auto; padding:56px 28px; text-align:center; background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.empty-state span { display:inline-block; color:var(--accent); font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.empty-state h2 { margin:12px 0 8px; color:var(--brand); }
.empty-state p { margin:0; color:var(--text-soft); }
.lightbox { position:fixed; inset:0; z-index:999; display:none; place-items:center; padding:30px; background:rgba(4,17,31,.92); }
.lightbox.open { display:grid; }
.lightbox img { max-width:min(1100px,92vw); max-height:82vh; border-radius:12px; }
.lightbox button { position:absolute; top:18px; right:22px; width:44px; height:44px; border:0; border-radius:50%; background:#fff; color:var(--brand); font-size:26px; cursor:pointer; }

.site-footer { background: linear-gradient(145deg, #071f3b, #0b3158); }
.footer-social a:hover { background: var(--accent); }
.float-donate { background: var(--accent); box-shadow: 0 12px 32px rgba(223,45,53,.28); }
.float-donate:hover { background: var(--accent-dark); }

@media (max-width: 1180px) {
  .nav-links { background: #fffef9; }
  .nav-links > li > a { color: var(--brand); padding: 12px 16px; border-bottom: 0; }
  .nav-links > li > a:hover, .nav-links > li.active > a { color: var(--accent-dark); background: var(--accent-soft); }
  .admin-link { display:none; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero { padding-top: 54px; }
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 640px) {
  .topbar span { display:none; }
  .nav { height:68px; }
  .brand .logo { width:43px; height:43px; }
  .brand .name { font-size:15px; }
  .brand .name small { display:none; }
  .nav-actions .btn { display:none; }
  .hero { padding:46px 0 54px; }
  .hero-slides .slide img { height:270px; }
  .section { padding:56px 0; }
  .page-hero { padding:44px 0 48px; }
  .gallery-grid { grid-template-columns:1fr; }
  .form-card { padding:22px 18px; }
  .float-donate { right:14px; bottom:14px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: clamp(24px,8vw,34px); }
}
