/* ============================================================================
 * 天依教育集团官网 · 全站样式表（style.css）
 * ============================================================================
 *
 * 【这个文件是干什么的？—— 用一句话解释】
 *   它决定网站“长什么样”：颜色、字体、间距、圆角、动画、
 *   以及手机/平板/电脑上的布局变化，全部由这里控制。
 *
 * 【目录（从上到下）】
 *   1. 主题变量 —— 所有颜色都先在这里定义好：
 *      日间模式主题色是 #66CCFF（浅蓝），夜间模式是深蓝黑。
 *      切换主题只是把“当前用哪套颜色”换一下，全站自动跟着变。
 *   2. 基础样式 —— 全局字体、链接、布局容器等。
 *   3. 顶部区域 —— 集团名称区、主导航（含右侧登录状态与日/夜按钮）。
 *   4. 封面与内容区块 —— 首页大图、数据速览、卡片网格。
 *   5. 组件 —— 按钮、徽章、列表、表单、弹窗、表格、图表容器等。
 *   6. 各页面专属 —— 登录页、论坛、管理后台布局。
 *   7. 页脚与提示气泡。
 *   8. 响应式规则 —— 屏幕变窄时（平板/手机）自动调整布局，
 *      保证在 Chrome、Firefox、手机、平板、电脑上都能正常显示。
 *
 * 【想改颜色？】
 *   只需改最上面“主题变量”里的值即可，全站统一生效。
 * ============================================================================ */

/* ---------- 主题变量 ---------- */
:root {
  --primary: #66ccff;
  --primary-deep: #2f9ede;
  --primary-ink: #0c3a5c;          /* 主题色上的文字 */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 18px rgba(15, 60, 100, .08);
  --shadow-lg: 0 14px 40px rgba(15, 60, 100, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans Arabic",
          "Noto Naskh Arabic", sans-serif;
  --nav-h: 56px;
  --trans: .22s ease;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f8fd;
  --bg-soft: #e9f4fc;
  --card: #ffffff;
  --ink: #16324e;
  --ink-strong: #0b2238;
  --muted: #5d7a95;
  --line: #d8e8f4;
  --nav-bg: linear-gradient(90deg, #66ccff 0%, #46b6f2 100%);
  --nav-ink: #ffffff;
  --hero-bg: linear-gradient(160deg, #eaf7ff 0%, #c9ecff 48%, #a8e0ff 100%);
  --hero-ink: #0b2238;
  --footer-bg: #0d2b4a;
  --footer-ink: #c4d8ea;
  --chart-grid: #e3eef7;
  --danger: #e05a5a;
  --danger-soft: #fdeaea;
  --ok: #23a55a;
  --ok-soft: #e6f7ee;
  --warn: #d98a2b;
  --warn-soft: #fdf3e3;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1422;
  --bg-soft: #0e1c2e;
  --card: #122238;
  --ink: #cfe0f0;
  --ink-strong: #eef6ff;
  --muted: #8aa3bd;
  --line: #1e3248;
  --nav-bg: #0f2036;
  --nav-ink: #d7e9f8;
  --hero-bg: radial-gradient(1200px 600px at 80% -10%, #123a5e 0%, transparent 60%),
             linear-gradient(160deg, #0a1830 0%, #0c2038 60%, #0d2844 100%);
  --hero-ink: #eaf5ff;
  --footer-bg: #071120;
  --footer-ink: #9fb7cf;
  --chart-grid: #22364e;
  --danger: #ff7a7a;
  --danger-soft: #3a1e26;
  --ok: #4fd08a;
  --ok-soft: #14322a;
  --warn: #ffb454;
  --warn-soft: #332616;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.flex { display: flex; align-items: center; }
.gap8 { gap: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 导航条内的登录状态区 ---------- */
.u-account { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; }
.u-account a { color: var(--primary-deep); font-weight: 600; padding: 0; }
:root[data-theme="dark"] .u-account a { color: var(--primary); }
.nav .u-account { color: var(--nav-ink); font-size: 13.5px; white-space: nowrap; }
.nav .u-account a { color: var(--nav-ink); font-weight: 700; }
.nav .u-account a:hover { text-decoration: underline; }
/* 语言切换下拉框：外观与旁边的日/夜切换按钮保持一致（胶囊形 + 自定义小箭头） */
.lang-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 1px solid var(--line);
  background-color: var(--card);
  color: var(--ink);
  border-radius: 18px;
  padding: 6px 30px 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  line-height: 1.4;
  max-width: 148px;
  white-space: nowrap;
  transition: transform var(--trans), box-shadow var(--trans), background var(--trans), border-color var(--trans);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235d7a95' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.lang-select:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.nav .lang-select {
  background-color: rgba(255, 255, 255, .2);
  color: var(--nav-ink);
  border-color: rgba(255, 255, 255, .45);
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.nav .lang-select:hover { background-color: rgba(255, 255, 255, .36); box-shadow: none; }
:root[data-theme="dark"] .nav .lang-select {
  background-color: rgba(102, 204, 255, .16);
  border-color: rgba(102, 204, 255, .5);
}
:root[data-theme="dark"] .nav .lang-select:hover { background-color: rgba(102, 204, 255, .28); }
.nav .lang-select option { color: #16324e; background: #ffffff; }
html[dir="rtl"] .lang-select { padding: 6px 14px 6px 30px; background-position: left 12px center; }
/* 用户名前的头像框：框内为用户名首字（管理员显示「管」） */
.u-avatar {
  width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92);
  color: var(--primary-deep);
  font-size: 13px; font-weight: 800; line-height: 1;
  flex-shrink: 0;
}
.theme-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  font-family: inherit;
  white-space: nowrap;
  transition: transform var(--trans), box-shadow var(--trans), background var(--trans);
}
.theme-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.nav .theme-btn {
  background: rgba(255, 255, 255, .2);
  color: var(--nav-ink);
  border-color: rgba(255, 255, 255, .45);
  box-shadow: none;
}
.nav .theme-btn:hover { background: rgba(255, 255, 255, .36); box-shadow: none; }
:root[data-theme="dark"] .nav .theme-btn {
  background: rgba(102, 204, 255, .16);
  border-color: rgba(102, 204, 255, .5);
}
:root[data-theme="dark"] .nav .theme-btn:hover { background: rgba(102, 204, 255, .28); }

/* ---------- 校名区 ---------- */
.masthead { background: var(--card); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 62px; height: 62px; border-radius: 16px; flex-shrink: 0; }
.school-name { margin: 0; font-size: 26px; line-height: 1.25; color: var(--ink-strong); font-weight: 800; letter-spacing: 1px; }
.school-name-en { font-size: 12px; letter-spacing: 2.5px; color: var(--muted); text-transform: uppercase; }
.motto { text-align: right; }
.motto-label { font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.motto-text {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-deep);
  letter-spacing: 2px;
}
:root[data-theme="dark"] .motto-text { color: var(--primary); }

/* ---------- 主导航 ---------- */
.nav { background: var(--nav-bg); position: sticky; top: 0; z-index: 90; box-shadow: 0 2px 10px rgba(8, 40, 70, .18); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links a {
  display: inline-block;
  padding: 8px 16px;
  color: var(--nav-ink);
  font-size: 15.5px;
  font-weight: 600;
  border-radius: 8px;
  transition: background var(--trans);
  white-space: nowrap;
}
.nav-links a:hover { background: rgba(255, 255, 255, .18); }
.nav-links a.active { background: rgba(11, 34, 56, .28); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--nav-ink);
  font-size: 26px;
  cursor: pointer;
  padding: 4px 10px;
}
.nav-right { display: flex; align-items: center; gap: 8px; }
/* 窗口较宽时：登录状态与日/夜切换按钮贴到导航栏最右侧 */
@media (min-width: 1200px) {
  .nav-right {
    position: absolute;
    right: 22px;
    top: 0;
    bottom: 0;
  }
}

/* ---------- 封面 ---------- */
.hero { background: var(--hero-bg); color: var(--hero-ink); position: relative; overflow: hidden; }
.hero-decor { position: absolute; inset: 0; pointer-events: none; opacity: .55; }
.hero-inner { position: relative; padding: 74px 0 84px; max-width: 860px; }
.hero-title { margin: 0 0 16px; font-size: 52px; line-height: 1.18; font-weight: 800; letter-spacing: 1px; color: var(--hero-ink); }
.hero-title .hl { color: var(--primary-deep); }
:root[data-theme="dark"] .hero-title .hl { color: var(--primary); }
.hero-sub { font-size: 18px; color: var(--muted); margin: 0 0 10px; max-width: 640px; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 20px 56px;
  margin-top: -28px;
}
.hstat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.hnum { font-size: 30px; font-weight: 800; color: var(--primary-deep); line-height: 1.2; }
:root[data-theme="dark"] .hnum { color: var(--primary); }
.hlabel { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 区块与网格 ---------- */
.page { min-height: 60vh; }
.section { padding: 56px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-title { margin: 0; font-size: 26px; font-weight: 800; color: var(--ink-strong); display: flex; align-items: center; gap: 10px; }
.sec-title::before { content: ""; width: 6px; height: 26px; border-radius: 3px; background: linear-gradient(180deg, #66ccff, #2f9ede); }
.sec-sub { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.sec-more { color: var(--primary-deep); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
:root[data-theme="dark"] .sec-more { color: var(--primary); }
.sec-more:hover { text-decoration: underline; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.f-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, #66ccff, #2f9ede);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
}
.feature h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink-strong); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; font-size: 15px; font-weight: 600;
  padding: 11px 24px; border-radius: 10px;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans), opacity var(--trans);
  text-align: center;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, #66ccff, #38a8ea);
  color: #0c3a5c;
  box-shadow: 0 6px 16px rgba(102, 204, 255, .35);
}
.btn-primary:hover { background: linear-gradient(135deg, #7ed4ff, #2f9ede); box-shadow: 0 8px 20px rgba(102, 204, 255, .45); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary-deep); color: var(--primary-deep); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .88; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary-deep); color: var(--primary-deep); padding: 6px 14px; font-size: 13.5px; }
:root[data-theme="dark"] .btn-outline { color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: rgba(102, 204, 255, .14); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block; padding: 1px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap;
}
.b-blue { background: rgba(102, 204, 255, .22); color: #1d7bb8; }
.b-green { background: var(--ok-soft); color: var(--ok); }
.b-orange { background: var(--warn-soft); color: var(--warn); }
.b-purple { background: rgba(168, 130, 255, .18); color: #8a63e8; }
.b-red { background: var(--danger-soft); color: var(--danger); }
.b-gray { background: var(--bg-soft); color: var(--muted); }
:root[data-theme="dark"] .b-blue { color: #8fd6ff; }

/* ---------- 列表（公告/帖子通用） ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-bottom: 1px dashed var(--line);
  transition: background var(--trans);
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--bg-soft); }
.list-title { flex: 1; min-width: 0; color: var(--ink); font-size: 15px; }
.list-title:hover { color: var(--primary-deep); }
:root[data-theme="dark"] .list-title:hover { color: var(--primary); }
.list-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.num-tag {
  flex-shrink: 0; font-size: 12px; color: var(--muted); background: var(--bg-soft);
  border-radius: 8px; padding: 2px 8px; white-space: nowrap;
}

/* ---------- 联盟学校/友链卡片 ---------- */
.partner-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.partner-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.partner-logo {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, #66ccff, #2f9ede);
  color: #fff; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.partner-name { font-weight: 700; font-size: 15.5px; color: var(--ink-strong); }
.partner-desc { font-size: 12.5px; color: var(--muted); }
.partner-go { margin-left: auto; color: var(--primary-deep); font-size: 13px; white-space: nowrap; }
:root[data-theme="dark"] .partner-go { color: var(--primary); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--primary-deep);
  box-shadow: 0 0 0 3px rgba(102, 204, 255, .22);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 密码输入框的「显示/隐藏密码」小眼睛 ---------- */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 44px; } /* 右侧留出按钮空间，避免文字被遮住 */
.pwd-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  color: var(--muted);
  transition: color var(--trans);
}
.pwd-eye:hover { color: var(--primary-deep); }
:root[data-theme="dark"] .pwd-eye:hover { color: var(--primary); }
.form-error {
  display: none;
  background: var(--danger-soft); color: var(--danger);
  border-radius: var(--radius-sm); padding: 9px 13px;
  font-size: 13.5px; margin-bottom: 14px;
}
.form-error.show { display: block; }
.search-box { display: flex; gap: 8px; }
.search-box input {
  flex: 1; background: var(--card); border: 1.5px solid var(--line); border-radius: 22px;
  padding: 8px 18px; color: var(--ink); font-size: 14.5px; outline: none; font-family: inherit;
}
.search-box input:focus { border-color: var(--primary-deep); }

/* ---------- 标签切换 ---------- */
.tab-switch { display: flex; gap: 6px; margin-bottom: 16px; background: var(--bg-soft); padding: 5px; border-radius: 12px; }
.tab-switch button {
  flex: 1; border: 0; background: transparent; padding: 9px 0; border-radius: 9px;
  cursor: pointer; font-size: 15px; font-weight: 600; color: var(--muted); transition: all var(--trans);
}
.tab-switch button.active { background: var(--card); color: var(--primary-deep); box-shadow: var(--shadow); }
:root[data-theme="dark"] .tab-switch button.active { color: var(--primary); }

/* ---------- 弹窗 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 18, 32, .55);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.dialog {
  background: var(--card); border-radius: 16px; width: 100%; max-width: 620px;
  max-height: 86vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  transform: translateY(14px); transition: transform .2s;
}
.modal-backdrop.open .dialog { transform: translateY(0); }
.dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.dialog-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink-strong); }
.dialog-close {
  border: 0; background: var(--bg-soft); color: var(--muted); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1;
  transition: background var(--trans), color var(--trans);
}
.dialog-close:hover { background: var(--danger-soft); color: var(--danger); }
.dialog-body { padding: 20px 22px; overflow-y: auto; }
.dialog-foot { padding: 12px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--bg-soft); color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--bg-soft); }
.table .ops { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  background: var(--hero-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 28px 16px; position: relative; overflow: hidden;
}
/* 右上角悬浮控件组：语言下拉框 + 日/夜切换按钮 */
.login-float {
  position: absolute; top: 18px; right: 18px;
  display: flex; align-items: center; gap: 8px;
}
.login-card {
  width: 100%; max-width: 430px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: 34px 32px 26px;
  box-shadow: var(--shadow-lg); position: relative;
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; text-align: center; }
.login-brand img { width: 68px; height: 68px; border-radius: 18px; }
.login-brand h1 { margin: 0; font-size: 22px; color: var(--ink-strong); font-weight: 800; }
.login-brand .en { font-size: 11px; letter-spacing: 3px; color: var(--muted); }
.login-foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.login-foot a { color: var(--primary-deep); }
:root[data-theme="dark"] .login-foot a { color: var(--primary); }
.db-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px; margin-top: 10px;
}
.db-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* ---------- 论坛 ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); color: var(--muted);
  padding: 5px 16px; border-radius: 20px; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: all var(--trans); font-family: inherit;
}
.chip:hover { border-color: var(--primary-deep); color: var(--primary-deep); }
.chip.active { background: linear-gradient(135deg, #66ccff, #2f9ede); color: #0c3a5c; border-color: transparent; }
.post-item { display: flex; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.post-item:hover .post-title { color: var(--primary-deep); }
:root[data-theme="dark"] .post-item:hover .post-title { color: var(--primary); }
.post-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #66ccff, #2f9ede); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
}
.post-main { flex: 1; min-width: 0; }
.post-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--ink-strong); transition: color var(--trans); }
.post-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.post-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

.pd-title { margin: 0 0 8px; font-size: 24px; font-weight: 800; color: var(--ink-strong); line-height: 1.35; }
.pd-meta { font-size: 13px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; flex-wrap: wrap; }
.pd-body { padding: 20px 2px; font-size: 15.5px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.reply-item { padding: 14px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 12px; }
.reply-avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg-soft); color: var(--primary-deep); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
:root[data-theme="dark"] .reply-avatar { color: var(--primary); }
.reply-main { flex: 1; min-width: 0; }
.reply-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.reply-author { font-weight: 700; color: var(--ink-strong); }
.reply-content { font-size: 14.5px; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }

/* ---------- 后台 ---------- */
.admin-shell { display: flex; min-height: calc(100vh - var(--nav-h) - 36px); align-items: stretch; }
.admin-side {
  width: 224px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line);
  padding: 18px 12px;
}
.admin-side .side-brand { padding: 0 10px 14px; border-bottom: 1px solid var(--line); font-weight: 800; color: var(--ink-strong); font-size: 15px; margin-bottom: 12px; }
.admin-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.admin-nav button {
  display: block; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14.5px; font-weight: 600;
  transition: all var(--trans);
}
.admin-nav button:hover { background: var(--bg-soft); color: var(--ink); }
.admin-nav button.active { background: linear-gradient(135deg, #66ccff, #2f9ede); color: #0c3a5c; }
.admin-main { flex: 1; padding: 22px; min-width: 0; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.stat-num { font-size: 26px; font-weight: 800; color: var(--ink-strong); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--muted); }
.chart-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 20px; }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.chart-title { font-size: 15px; font-weight: 700; color: var(--ink-strong); margin: 0 0 10px; }
.chart-canvas-wrap { position: relative; width: 100%; height: 260px; }
.chart-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.db-status-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.admin-toolbar .spacer { flex: 1; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink-strong); color: var(--bg); padding: 9px 20px; border-radius: 22px;
  font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .25s ease;
}
:root[data-theme="dark"] .toast { background: #eaf5ff; color: #0a1422; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--muted); padding: 36px 12px; font-size: 14px; }

/* ---------- 批量导入结果 ---------- */
.import-result {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.8;
  word-break: break-all;
}
.import-result.ok { background: var(--ok-soft); border-color: rgba(35, 165, 90, .35); color: var(--ok); }
.import-result.warn { background: var(--warn-soft); border-color: rgba(217, 138, 43, .35); color: var(--warn); }
.import-result.err { background: var(--danger-soft); border-color: rgba(224, 90, 90, .35); color: var(--danger); }
.import-result .import-errors { margin-top: 8px; font-size: 13px; line-height: 1.9; }

/* ---------- 加载条 ---------- */
.loading-bar { text-align: center; color: var(--muted); padding: 26px 0; font-size: 14px; }
.spinner {
  width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--primary-deep);
  border-radius: 50%; display: inline-block; vertical-align: -5px; margin-right: 8px;
  animation: spin .8s linear infinite;
}
:root[data-theme="dark"] .spinner { border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 页脚 ---------- */
.footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: 40px; }
.footer .wrap { padding-top: 40px; padding-bottom: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 26px; }
.foot-brand { font-size: 19px; font-weight: 800; color: #ffffff; margin: 0 0 8px; }
.foot-desc { font-size: 13px; color: var(--footer-ink); opacity: .85; margin: 0 0 10px; line-height: 1.8; }
.footer h4 { color: #ffffff; font-size: 15px; margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul a { display: inline-block; padding: 3px 0; font-size: 13.5px; color: var(--footer-ink); opacity: .9; }
.footer ul a:hover { color: #66ccff; }
.footer .contact-line { font-size: 13px; opacity: .9; padding: 2px 0; }
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 26px; padding-top: 16px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; opacity: .8;
}
.foot-bottom a { color: #8fd0f7; }

/* ---------- 阿拉伯语（从右到左 RTL）适配 ---------- */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .nav-right { right: auto; left: 22px; }
html[dir="rtl"] .login-float { right: auto; left: 18px; }
html[dir="rtl"] .motto { text-align: left; }
html[dir="rtl"] .admin-side { border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .table th, html[dir="rtl"] .table td { text-align: right; }
html[dir="rtl"] .pwd-wrap input { padding-right: 13px; padding-left: 44px; }
html[dir="rtl"] .pwd-eye { right: auto; left: 8px; }
html[dir="rtl"] .sec-more, html[dir="rtl"] .partner-go { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .list-meta, html[dir="rtl"] .num-tag { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .search-box { flex-direction: row-reverse; }
html[dir="rtl"] .dialog-close { margin-left: 0; }
@media (max-width: 900px) {
  html[dir="rtl"] .nav-right { left: auto; }
}
@media (max-width: 640px) {
  .lang-select { max-width: 108px; font-size: 12.5px; padding: 5px 24px 5px 10px; background-position: right 8px center; }
  html[dir="rtl"] .lang-select { padding: 5px 10px 5px 24px; background-position: left 8px center; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-title { font-size: 38px; }
  .hero-inner { padding: 56px 0 68px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--card); flex-direction: column; align-items: stretch;
    padding: 10px 16px 16px; box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--ink); padding: 11px 12px; border-radius: 8px; }
  .nav-links a:hover { background: var(--bg-soft); }
  .nav-links a.active { background: var(--bg-soft); color: var(--primary-deep); }
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .admin-side .side-brand { display: none; }
  .admin-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .admin-nav button { white-space: nowrap; }
  .admin-main { padding: 16px 12px; }
  .motto { display: none; }
}
@media (max-width: 640px) {
  .hero-title { font-size: 30px; }
  .hero-sub { font-size: 15.5px; }
  .hero-inner { padding: 44px 0 60px; }
  .hero-stats { gap: 10px; }
  .hnum { font-size: 24px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .sec-title { font-size: 22px; }
  .list-meta { display: none; }
  .dialog-body { padding: 16px; }
  .login-card { padding: 26px 20px 20px; }
  .school-name { font-size: 21px; }
  .brand-logo { width: 50px; height: 50px; }
  .nav .theme-btn { padding: 5px 11px; font-size: 12.5px; }
  .nav .u-account { font-size: 12.5px; }
}
@media print {
  .nav, .theme-btn, .hero-actions { display: none !important; }
}
