/* ===========================================================
   高州市大坡中学校园门户 — 主样式
   =========================================================== */

:root {
  --brand: #12547d;
  --brand-2: #1a6fa3;
  --brand-dark: #0b3856;
  --brand-soft: #e8f2f8;
  --brand-line: #cfe3ef;

  --party: #b23227;
  --party-soft: #fdf1ef;

  --ink: #1c2733;
  --ink-2: #3d4a57;
  --muted: #77838f;
  --line: #e3e8ee;
  --bg: #f4f6f9;
  --white: #ffffff;

  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 42, 67, .06);
  --shadow: 0 2px 12px rgba(16, 42, 67, .08);
  --shadow-lg: 0 10px 30px rgba(16, 42, 67, .12);

  --wrap: 1200px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", system-ui, sans-serif;
  --serif: "Songti SC", "SimSun", "Georgia", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

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

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

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }

button { font-family: inherit; cursor: pointer; }

input, select, textarea { font-family: inherit; font-size: 15px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================ 顶部条 ============================ */
.topbar {
  background: var(--brand-dark);
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  line-height: 34px;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar-left { display: flex; align-items: center; gap: 10px; }

.topbar .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6fd08c;
  box-shadow: 0 0 0 3px rgba(111, 208, 140, .2);
}

.topbar-right { display: flex; gap: 18px; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .35; }

/* ============================ 头部 ============================ */
.masthead {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 20;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand { display: flex; align-items: center; gap: 16px; }

.brand-logo {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand-line);
  flex-shrink: 0;
  background: #fff;
}

.brand-text h1 {
  font-size: 30px;
  letter-spacing: 3px;
  color: var(--brand-dark);
  font-weight: 700;
  font-family: var(--serif);
}

.brand-en {
  margin: 2px 0 0;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--muted);
  text-transform: uppercase;
}

.brand-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.masthead-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.motto {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 4px;
  color: var(--brand);
  font-weight: 600;
}

.searchbox { display: flex; }

.searchbox input {
  width: 200px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  outline: none;
  background: #fbfcfd;
  color: var(--ink);
}

.searchbox input:focus { border-color: var(--brand-2); background: #fff; }

.searchbox button {
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px;
  transition: background .18s;
}

.searchbox button:hover { background: var(--brand-2); }

/* ============================ 主导航 ============================ */
.mainnav {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  border-top: 3px solid var(--brand-dark);
}

.mainnav ul {
  display: flex;
  flex-wrap: wrap;
}

.mainnav li { flex: 1 1 auto; }

.mainnav a {
  display: block;
  text-align: center;
  color: rgba(255, 255, 255, .92);
  font-size: 15px;
  font-weight: 500;
  padding: 0 10px;
  line-height: 50px;
  letter-spacing: .5px;
  position: relative;
  white-space: nowrap;
}

.mainnav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 2px;
  background: #ffd36b;
  transition: width .22s, left .22s;
}

.mainnav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.mainnav a:hover::after,
.mainnav a.active::after { width: 26px; left: calc(50% - 13px); }

.mainnav a.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; }

.mainnav .nav-login {
  background: rgba(255, 211, 107, .16);
  color: #ffe6a3;
  font-weight: 600;
}
.mainnav .nav-login:hover { background: rgba(255, 211, 107, .28); color: #fff8e2; }

/* ============================ 轮播 ============================ */
.hero {
  position: relative;
  height: 400px;
  overflow: hidden;
  background: var(--brand-dark);
}

.hero-slides { height: 100%; }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}

.hero-slide.is-active { opacity: 1; pointer-events: auto; }

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.bg-0 {
  background:
    radial-gradient(900px 420px at 78% 20%, rgba(255, 255, 255, .16), transparent 60%),
    linear-gradient(115deg, #0b3856 0%, #12547d 45%, #1e7ab0 100%);
}

.bg-1 {
  background:
    radial-gradient(800px 400px at 20% 80%, rgba(255, 211, 107, .18), transparent 60%),
    linear-gradient(115deg, #14324a 0%, #1a5f88 55%, #2a86bd 100%);
}

.bg-2 {
  background:
    radial-gradient(700px 380px at 70% 70%, rgba(111, 208, 140, .14), transparent 60%),
    linear-gradient(115deg, #0d2f47 0%, #175f85 50%, #1c6f96 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(120deg, transparent 20%, #000 90%);
  -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000 90%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 760px;
}

.hero-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 211, 107, .18);
  border: 1px solid rgba(255, 211, 107, .45);
  color: #ffd977;
  font-size: 12.5px;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.hero-content h2 {
  color: #fff;
  font-size: 34px;
  line-height: 1.4;
  letter-spacing: 1px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .2);
}

.hero-content p {
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.9;
  margin: 16px 0 26px;
  max-width: 700px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius);
  background: #ffd36b;
  color: #4a3400;
  font-weight: 700;
  font-size: 14.5px;
  transition: transform .18s, box-shadow .18s;
}

.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 211, 107, .32); color: #3a2800; }

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dots button {
  width: 30px;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, .34);
  padding: 0;
  transition: background .2s, width .2s;
}

.hero-dots button.is-active { background: #ffd36b; width: 44px; }

/* ============================ 快捷服务 ============================ */
.quickbar { margin-top: -34px; position: relative; z-index: 10; }

.quickbar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.quick-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--white);
  transition: background .18s, transform .18s;
}

.quick-item:hover { background: var(--brand-soft); color: var(--ink); }

.quick-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  border: 1px solid var(--brand-line);
}

.quick-item--accent .quick-icon {
  background: #fdf3d8;
  color: #a37a12;
  border-color: #f0dda4;
}

.quick-item strong { display: block; font-size: 15.5px; color: var(--ink); }
.quick-item em { font-style: normal; font-size: 12.5px; color: var(--muted); }

/* ============================ 面板 ============================ */
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  padding: 20px 22px 22px;
  margin-bottom: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
  gap: 12px;
}

.panel-head h3 {
  font-size: 17.5px;
  color: var(--brand-dark);
  letter-spacing: 1px;
  position: relative;
  padding-left: 13px;
}

.panel-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: var(--brand-2);
}

.panel .more { font-size: 13px; color: var(--muted); white-space: nowrap; }
.panel .more:hover { color: var(--brand-2); }

/* ============================ 首页布局 ============================ */
.home-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  margin-top: 26px;
}

.home-col-main { min-width: 0; }
.home-col-side { min-width: 0; }

/* 通知公告列表 */
.noticelist li { border-bottom: 1px dashed #eef1f5; }
.noticelist li:last-child { border-bottom: 0; }

.noticelist a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 0;
  font-size: 14.8px;
}

.nl-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}

.noticelist a:hover .nl-title { color: var(--brand-2); }

.nl-date {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.tag-hot {
  flex-shrink: 0;
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--party);
  color: #fff;
  line-height: 1.6;
}

/* 新闻卡片 */
.newsgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.newscard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}

.newscard:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--brand-line);
}

.newscard--lead {
  grid-column: 1 / -1;
  flex-direction: row;
}

.newscard-cover {
  height: 108px;
  flex-shrink: 0;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.newscard--lead .newscard-cover {
  width: 240px;
  height: auto;
  min-height: 148px;
}

.newscard-cover span {
  color: rgba(255, 255, 255, .9);
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 6px;
  opacity: .55;
}

.cov-0 { background: linear-gradient(135deg, #12547d, #2a86bd); }
.cov-1 { background: linear-gradient(135deg, #1a5f88, #4a9ecb); }
.cov-2 { background: linear-gradient(135deg, #2b4a63, #5f8299); }
.cov-3 { background: linear-gradient(135deg, #14506e, #3d8fb5); }

.newscard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; min-width: 0; }

.newscard h4 {
  font-size: 15.5px;
  color: var(--ink);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.newscard--lead h4 { font-size: 19px; -webkit-line-clamp: 2; }

.newscard p {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.newscard-meta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: #9aa5b1;
}

/* 校园数据 */
.statgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat {
  background: linear-gradient(180deg, #f8fbfd, #f1f6fa);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 26px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  font-family: var(--serif);
}

.stat span { font-size: 12.5px; color: var(--muted); }

.stat-note { margin: 12px 0 0; font-size: 12px; color: #9aa5b1; text-align: right; }

/* 党建 */
.panel-party .panel-head h3::before { background: var(--party); }
.panel-party .panel-head h3 { color: var(--party); }

.party-list li { border-bottom: 1px dashed #f0e4e2; padding: 10px 0; }
.party-list li:last-child { border-bottom: 0; }

.party-list h4 {
  font-size: 14.2px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.party-list a:hover h4 { color: var(--party); }
.party-list span { font-size: 12px; color: var(--muted); }

/* 概况简介 */
.about-brief { font-size: 14px; color: var(--ink-2); line-height: 1.9; margin: 0 0 14px; text-align: justify; }

.btn-ghost {
  display: inline-block;
  padding: 7px 18px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  color: var(--brand);
  font-size: 13.5px;
  background: var(--brand-soft);
  transition: all .18s;
}

.btn-ghost:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 三栏板块 */
.home-triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 6px auto 40px;
}

.simple-list li { padding: 9px 0; border-bottom: 1px dashed #eef1f5; }
.simple-list li:last-child { border-bottom: 0; }

.simple-list a {
  display: flex;
  gap: 9px;
  font-size: 14.2px;
  color: var(--ink-2);
  line-height: 1.6;
  align-items: flex-start;
}

.simple-list a:hover { color: var(--brand-2); }

.sl-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-2);
  margin-top: 9px;
  flex-shrink: 0;
  opacity: .5;
}

.tile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tile-links a {
  font-size: 13px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #f2f6f9;
  color: var(--ink-2);
  border: 1px solid #e6edf2;
}

.tile-links a:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }

/* ============================ 内页头部 ============================ */
.pagehead {
  position: relative;
  background: linear-gradient(115deg, #0b3856, #17608b 60%, #2280b3);
  color: #fff;
  overflow: hidden;
}

.pagehead-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(100deg, transparent 10%, #000 85%);
  -webkit-mask-image: linear-gradient(100deg, transparent 10%, #000 85%);
}

.pagehead-inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 42px;
  padding-bottom: 28px;
}

.pagehead-text h1 { font-size: 28px; letter-spacing: 4px; font-family: var(--serif); }

.pagehead-text p {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .72);
  letter-spacing: .5px;
}

.breadcrumb { font-size: 13px; color: rgba(255, 255, 255, .7); display: flex; gap: 8px; align-items: center; }
.breadcrumb a:hover { color: #ffd36b; }
.breadcrumb em { font-style: normal; color: #ffd36b; }

/* ============================ 内页布局 ============================ */
.inner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  padding: 26px 0 44px;
}

.inner-content { min-width: 0; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px 30px;
  box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: 20px; }

.card-title {
  font-size: 19px;
  color: var(--brand-dark);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

/* 侧栏 */
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.side-card h3 {
  font-size: 15.5px;
  color: var(--brand-dark);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.side-links li { border-bottom: 1px dashed #eef1f5; }
.side-links li:last-child { border-bottom: 0; }

.side-links a {
  display: block;
  padding: 9px 0;
  font-size: 14px;
  color: var(--ink-2);
  transition: padding-left .18s, color .18s;
}

.side-links a:hover { color: var(--brand-2); padding-left: 5px; }

.side-contact { font-size: 13.5px; color: var(--ink-2); line-height: 2; }
.side-contact b { color: var(--muted); font-weight: 500; }

/* ============================ 通用列表页 ============================ */
.list-page li { border-bottom: 1px dashed #eef1f5; }
.list-page li:last-child { border-bottom: 0; }

.list-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 4px;
  transition: background .18s;
}

.list-row:hover { background: #fafcfd; }

.list-date {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  background: #f4f8fb;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 8px 0;
  color: var(--brand);
}

.list-date b {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  font-family: var(--serif);
}

.list-date span { font-size: 11.5px; color: var(--muted); }

.list-body { flex: 1; min-width: 0; }

/* 党建栏目：日期块用红色调区分 */
.party-date {
  background: #fdf4f2;
  border-color: #f2d3cd;
  color: var(--party);
}

.party-date span { color: #bd8a83; }

.list-body h4 {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 5px;
}

.list-row:hover h4 { color: var(--brand-2); }

.list-body p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-meta { margin-top: 7px; font-size: 12.5px; color: #9aa5b1; display: flex; gap: 14px; }

/* ============================ 详情页 ============================ */
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 24px; }

.article-head h1 {
  font-size: 26px;
  line-height: 1.55;
  color: var(--ink);
  font-family: var(--serif);
  letter-spacing: .5px;
}

.article-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}

.article-meta .badge {
  background: var(--brand-soft);
  color: var(--brand);
  padding: 1px 10px;
  border-radius: 3px;
  font-size: 12.5px;
}

.article-body {
  font-size: 16px;
  line-height: 2.05;
  color: #2a3743;
  text-align: justify;
}

.article-body p { margin: 0 0 1.1em; text-indent: 2em; }
.article-body p:last-child { margin-bottom: 0; }

.article-sign {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  text-align: right;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.9;
}

.article-foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================ 表单 ============================ */
.form-narrow { max-width: 460px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 7px;
  font-weight: 500;
}

.field label .req { color: var(--party); }

.field input[type="text"],
.field input[type="password"],
.field input[type="date"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #d8e0e8;
  border-radius: var(--radius);
  outline: none;
  background: #fbfcfd;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 111, 163, .1);
}

.field textarea { min-height: 200px; resize: vertical; line-height: 1.8; }

.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.btn {
  display: inline-block;
  padding: 10px 26px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: background .18s, transform .18s;
}

.btn:hover { background: var(--brand-2); color: #fff; transform: translateY(-1px); }

.btn-block { width: 100%; text-align: center; }

.btn-sm { padding: 6px 16px; font-size: 13.5px; letter-spacing: 0; }

.btn-light { background: #eef3f7; color: var(--ink-2); }
.btn-light:hover { background: #e2ebf2; color: var(--ink); }

.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #a93226; }

.alert {
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid;
}

.alert-error { background: #fdf1ef; border-color: #f3c9c2; color: #a32b1e; }
.alert-info { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.alert-success { background: #eefaf2; border-color: #c4e9d1; color: #1e7a45; }

/* ============================ 登录页 ============================ */
.login-wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 560px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 34px 0 46px;
  box-shadow: var(--shadow);
}

.login-side {
  position: relative;
  background: linear-gradient(150deg, #0b3856, #12547d 55%, #1e7ab0);
  color: #fff;
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.login-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%);
}

.login-side > * { position: relative; z-index: 1; }

.login-logo {
  width: 86px; height: 86px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .3);
  margin-bottom: 22px;
}

.login-side h2 { font-size: 25px; letter-spacing: 3px; font-family: var(--serif); }
.login-side .sub { font-size: 12px; letter-spacing: 2px; color: rgba(255, 255, 255, .55); margin: 6px 0 26px; }

.login-side ul { display: flex; flex-direction: column; gap: 12px; }

.login-side li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, .8);
  align-items: flex-start;
}

.login-side li::before {
  content: "✓";
  color: #ffd36b;
  font-size: 13px;
  flex-shrink: 0;
}

.login-form { padding: 50px 52px; display: flex; flex-direction: column; justify-content: center; }

.login-form h1 {
  font-size: 23px;
  color: var(--brand-dark);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.login-form .lead { font-size: 13.5px; color: var(--muted); margin: 0 0 26px; }

.role-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}

.role-tabs span {
  flex: 1;
  text-align: center;
  font-size: 13.5px;
  padding: 9px 0;
  color: var(--muted);
  background: #fafcfd;
  border-right: 1px solid var(--line);
}

.role-tabs span:last-child { border-right: 0; }
.role-tabs span.on { background: var(--brand); color: #fff; }

.login-tip {
  margin-top: 22px;
  padding: 13px 16px;
  background: #f8fafc;
  border: 1px dashed #dbe4ec;
  border-radius: var(--radius);
  font-size: 12.8px;
  color: var(--muted);
  line-height: 1.9;
}

.login-tip b { color: var(--ink-2); }

/* ============================ 成绩/缴费查询 ============================ */
.query-panel {
  background: linear-gradient(135deg, #f7fbfd, #eef6fb);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 24px;
}

.query-panel h2 { font-size: 18px; color: var(--brand-dark); margin-bottom: 6px; }
.query-panel .desc { font-size: 13.5px; color: var(--muted); margin: 0 0 20px; }

.query-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.query-form .field { margin-bottom: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}

table.data th,
table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef1f5;
  text-align: center;
  white-space: nowrap;
}

table.data th {
  background: #f5f9fc;
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 13.5px;
  border-bottom: 2px solid var(--brand-line);
}

table.data tbody tr:hover { background: #fafcfd; }
table.data tbody tr:last-child td { border-bottom: 0; }

table.data td.left { text-align: left; }
table.data .num { font-variant-numeric: tabular-nums; }

.score-strong { color: var(--brand); font-weight: 700; }
.score-full { color: #9aa5b1; }
.score-null { color: #c4ccd4; }

.badge-status {
  display: inline-block;
  padding: 2px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.7;
}

.badge-paid { background: #eaf8ef; color: #1f7a45; border: 1px solid #c3e7d1; }
.badge-unpaid { background: #fdf1ef; color: #b23227; border: 1px solid #f2c9c2; }
.badge-partial { background: #fdf7e8; color: #946a10; border: 1px solid #eeddad; }

.fee-cards { display: grid; gap: 18px; }

.fee-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fee-head {
  background: #f6fafc;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.fee-head h4 { font-size: 15.5px; color: var(--ink); }
.fee-head .term { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.fee-sum {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: #fcfdfe;
}

.fee-sum div { padding: 13px; text-align: center; border-right: 1px solid var(--line); }
.fee-sum div:last-child { border-right: 0; }
.fee-sum b { display: block; font-size: 19px; color: var(--brand); font-variant-numeric: tabular-nums; }
.fee-sum b.owe { color: var(--party); }
.fee-sum span { font-size: 12.5px; color: var(--muted); }

/* ============================ 数据统计块 ============================ */
.infogrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.infobox {
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(180deg, #f9fcfe, #f2f8fb);
}

.infobox b {
  display: block;
  font-size: 24px;
  color: var(--brand);
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
}

.infobox span { font-size: 13px; color: var(--muted); }

/* ============================ 时间轴 / 荣誉 ============================ */
.timeline { position: relative; padding-left: 26px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand-line));
}

.timeline li { position: relative; padding: 0 0 22px; }
.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-2);
}

.timeline b { color: var(--brand); font-size: 15px; margin-right: 10px; font-variant-numeric: tabular-nums; }
.timeline span { color: var(--ink-2); font-size: 14.5px; }

.honor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.honor {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfdfe;
  align-items: flex-start;
}

.honor .yr {
  flex-shrink: 0;
  font-family: var(--serif);
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
}

.honor p { margin: 0; font-size: 13.8px; color: var(--ink-2); line-height: 1.65; }

/* 教师名片 */
.teacher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.teacher-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #fafcfd);
}

.teacher-avatar {
  width: 62px; height: 62px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  border: 1px solid var(--brand-line);
}

.teacher-card h4 { font-size: 15.5px; color: var(--ink); }
.teacher-card .role { font-size: 12.8px; color: var(--muted); margin-top: 3px; }
.teacher-card .desc { font-size: 13px; color: var(--ink-2); margin-top: 10px; line-height: 1.7; }

/* 课程表 */
.timetable th { font-size: 13px; }
.timetable td { font-size: 13px; }
.timetable td.filled { background: #f7fbfd; color: var(--ink-2); }

/* ============================ 个人中心 ============================ */
.portal-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(120deg, #0b3856, #17608b);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.portal-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  border: 2px solid rgba(255, 255, 255, .3);
  font-size: 26px;
  font-family: var(--serif);
  flex-shrink: 0;
}

.portal-head h2 { font-size: 21px; letter-spacing: 1px; }
.portal-head .meta { font-size: 13.5px; color: rgba(255, 255, 255, .72); margin-top: 4px; }

/* 个人中心成绩块 */
.score-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  background: #fcfdfe;
}

.score-block:last-child { margin-bottom: 0; }

.score-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}

.score-block-head h4 { font-size: 15px; color: var(--brand-dark); }
.score-block-head span { font-size: 12.5px; color: var(--muted); }

.score-chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.score-chip {
  border: 1px solid #e8eef3;
  border-radius: 4px;
  padding: 9px 4px;
  text-align: center;
  background: #fff;
}

.score-chip span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-chip b {
  font-size: 18px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.score-chip b.score-null { color: #c4ccd4; }

.score-total {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.score-total b {
  color: var(--brand);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  margin: 0 2px;
}

/* ============================ 页脚 ============================ */
.site-footer { background: #0e2e45; color: rgba(255, 255, 255, .68); margin-top: 20px; }

.footer-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 32px;
  padding-top: 42px;
  padding-bottom: 34px;
}

.footer-logo-row { display: flex; align-items: center; gap: 13px; }

.footer-logo-row img {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2);
}

.footer-brand h2 { font-size: 18px; color: #fff; letter-spacing: 1.5px; }
.footer-brand p { font-size: 10.5px; letter-spacing: 1.2px; margin: 3px 0 0; color: rgba(255, 255, 255, .42); }

.footer-desc { font-size: 13px; line-height: 1.9; margin: 16px 0 0; color: rgba(255, 255, 255, .55); }

.footer-col h3 {
  font-size: 14.5px;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: 1px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer-links li, .footer-contact li { font-size: 13.2px; padding: 5px 0; line-height: 1.8; }
.footer-links a:hover { color: #ffd36b; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12.5px;
  color: rgba(255, 255, 255, .45);
  padding: 15px 0;
}

.footer-bottom .wrap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.footer-bottom .sep { opacity: .4; }

/* ============================ 后台 ============================ */
.admin-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; background: #f4f6f9; }

.admin-side {
  background: #0e2e45;
  color: rgba(255, 255, 255, .72);
  padding: 22px 0;
  display: flex;
  flex-direction: column;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  margin-bottom: 14px;
}

.admin-brand img { width: 36px; height: 36px; border-radius: 50%; }
.admin-brand b { color: #fff; font-size: 13.5px; display: block; line-height: 1.4; }
.admin-brand span { font-size: 11px; color: rgba(255, 255, 255, .45); }

.admin-menu { padding: 0 12px; flex: 1; }

.admin-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, .72);
}

.admin-menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-menu a.on { background: var(--brand-2); color: #fff; font-weight: 600; }

.admin-foot { padding: 0 20px; font-size: 12px; }
.admin-foot a { color: rgba(255, 255, 255, .55); }
.admin-foot a:hover { color: #ffd36b; }

.admin-main { padding: 24px 28px 40px; min-width: 0; }

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-top h1 { font-size: 21px; color: var(--brand-dark); letter-spacing: 1px; }
.admin-top .who { font-size: 13.5px; color: var(--muted); }

.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }

.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.admin-card b { display: block; font-size: 26px; color: var(--brand); font-family: var(--serif); }
.admin-card span { font-size: 13px; color: var(--muted); }

.admin-card--cat { padding: 14px 16px; }
.admin-card--cat b { font-size: 20px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }

.chip {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.chip:hover { border-color: var(--brand-line); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.row-actions { display: flex; gap: 8px; justify-content: center; }

.row-actions a, .row-actions button {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
}

.row-actions a:hover { border-color: var(--brand-line); color: var(--brand); }
.row-actions button:hover { border-color: #f0c4bd; color: #b23227; background: #fdf5f4; }

/* ============================ 404 ============================ */
.notfound { text-align: center; padding: 90px 20px 110px; }
.notfound .code { font-size: 82px; font-family: var(--serif); color: var(--brand-line); line-height: 1; }
.notfound h1 { font-size: 22px; margin: 14px 0 10px; color: var(--ink); }
.notfound p { color: var(--muted); font-size: 14px; margin: 0 0 26px; }

/* ============================ 响应式 ============================ */
@media (max-width: 1080px) {
  .home-main { grid-template-columns: 1fr; }
  .home-triptych { grid-template-columns: 1fr 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .hero-content h2 { font-size: 28px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .admin-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .masthead-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .masthead-right { align-items: flex-start; text-align: left; width: 100%; }
  .searchbox input { flex: 1; width: auto; }
  .searchbox { width: 100%; }
  .quickbar-grid { grid-template-columns: 1fr 1fr; }
  .quickbar { margin-top: 0; }
  .hero { height: 340px; }
  .hero-content h2 { font-size: 22px; }
  .hero-content p { font-size: 13.5px; }
  .newsgrid { grid-template-columns: 1fr; }
  .newscard--lead { flex-direction: column; }
  .newscard--lead .newscard-cover { width: 100%; height: 120px; }
  .home-triptych { grid-template-columns: 1fr; }
  .inner-layout { grid-template-columns: 1fr; }
  .query-form { grid-template-columns: 1fr; }
  .teacher-grid { grid-template-columns: 1fr 1fr; }
  .score-chips { grid-template-columns: repeat(3, 1fr); }
  .honor-grid { grid-template-columns: 1fr; }
  .infogrid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; align-items: center; overflow-x: auto; padding: 10px; }
  .admin-brand { border: 0; margin: 0; padding: 0 12px 0 4px; }
  .admin-menu { display: flex; gap: 6px; padding: 0; }
  .admin-menu a { white-space: nowrap; margin: 0; }
  .admin-foot { display: none; }
  .brand-text h1 { font-size: 23px; letter-spacing: 2px; }
  .brand-logo { width: 60px; height: 60px; }
  .pagehead-text h1 { font-size: 22px; letter-spacing: 2px; }
  .card { padding: 20px 18px 24px; }
  .article-head h1 { font-size: 20px; }
  .article-body { font-size: 15.5px; }
  .footer-main { grid-template-columns: 1fr; gap: 22px; }
  .login-form { padding: 32px 24px; }
  .portal-head { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .quickbar-grid { grid-template-columns: 1fr; }
  .mainnav a { font-size: 13.5px; padding: 0 8px; line-height: 44px; }
  .mainnav ul { flex-wrap: nowrap; overflow-x: auto; }
  .mainnav li { flex: 0 0 auto; }
  .hero { height: 300px; }
  .hero-content h2 { font-size: 19px; }
  .hero-content p { display: none; }
  .teacher-grid { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: 1fr 1fr; }
  .fee-sum { grid-template-columns: 1fr; }
  .fee-sum div { border-right: 0; border-bottom: 1px solid var(--line); }
}
