/* ============================================================
   团委管理系统 - 全局样式
   主题色：团旗红 #cf2e2e
   ============================================================ */

:root {
  --yl-red: #cf2e2e;
  --yl-red-dark: #a62525;
  --yl-red-light: #faeaea;
  --yl-gold: #ffd76e;
  --yl-bg: #f4f6fa;
  --yl-sidebar: #1e2430;
  --yl-sidebar-hover: #2a3141;
  --yl-text: #303133;
  --yl-text-sub: #8a9099;
  --yl-border: #e8ebf0;

  /* 覆盖 Element Plus 主色 */
  --el-color-primary: #cf2e2e;
  --el-color-primary-light-3: #dd6d6d;
  --el-color-primary-light-5: #e79797;
  --el-color-primary-light-7: #f1c0c0;
  --el-color-primary-light-8: #f5d5d5;
  --el-color-primary-light-9: #faeaea;
  --el-color-primary-dark-2: #a62525;
  --el-border-radius-base: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--yl-text);
  background: var(--yl-bg);
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

/* ---------------- 通用工具类 ---------------- */
.mt16 { margin-top: 16px; }
.mr4 { margin-right: 4px; }

.link-text { color: var(--yl-red); cursor: pointer; font-weight: 600; }
.link-text:hover { text-decoration: underline; }

.pre-wrap { white-space: pre-wrap; word-break: break-word; line-height: 1.85; }

.empty-tip {
  padding: 40px 16px;
  text-align: center;
  color: var(--yl-text-sub);
  font-size: 13px;
}

.section-title {
  margin: 20px 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--yl-text);
  padding-left: 10px;
  border-left: 3px solid var(--yl-red);
  line-height: 1.2;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.section-bar .section-title { margin: 20px 0 10px; }

.dialog-tip { margin: 0 0 12px; color: var(--yl-text-sub); font-size: 13px; }

.score-text { color: var(--yl-red); font-size: 15px; }

/* ---------------- 页面容器 ---------------- */
.page { padding-bottom: 8px; }

.panel {
  background: #fff;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(24, 32, 48, 0.06), 0 1px 2px rgba(24, 32, 48, 0.04);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--yl-border);
}
.panel__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding-left: 11px;
}
.panel__head h3::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #e05a5a, var(--yl-red));
}
.panel__sub { font-size: 12px; color: var(--yl-text-sub); }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.page-header__text h2 { margin: 0 0 4px; font-size: 21px; font-weight: 700; letter-spacing: .3px; }
.page-header__text p { margin: 0; font-size: 13px; color: var(--yl-text-sub); }
.page-header__actions { display: flex; gap: 8px; align-items: center; }

/* ---------------- 统计卡片 ---------------- */
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(24, 32, 48, 0.06);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(24, 32, 48, 0.1); }
.stat-card::after {
  content: '';
  position: absolute;
  right: -26px; top: -26px;
  width: 78px; height: 78px;
  border-radius: 50%;
  background: var(--card-color, var(--yl-red));
  opacity: .07;
}
.stat-card__icon {
  width: 48px; height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--card-color, var(--yl-red)), color-mix(in srgb, var(--card-color, var(--yl-red)) 68%, #fff));
  box-shadow: 0 4px 10px color-mix(in srgb, var(--card-color, var(--yl-red)) 35%, transparent);
}
.stat-card__body { min-width: 0; }
.stat-card__label { font-size: 12.5px; color: var(--yl-text-sub); margin-bottom: 3px; }
.stat-card__value { font-size: 24px; font-weight: 700; line-height: 1.1; color: #1f2430; }
.stat-card__unit { font-size: 12px; font-weight: 400; color: var(--yl-text-sub); margin-left: 3px; }
.stat-card__hint { font-size: 11.5px; color: #a8aeb8; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- 表格与筛选 ---------------- */
.filter-bar {
  background: #fafbfd;
  border: 1px solid var(--yl-border);
  border-radius: 8px;
  padding: 14px 16px 2px;
  margin-bottom: 14px;
}
.filter-bar--simple {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--yl-text-sub);
}
.table-toolbar__info b { color: var(--yl-red); }

.pager-wrap { display: flex; justify-content: flex-end; margin-top: 14px; }

.el-table th.el-table__cell { background: #f7f8fb !important; font-weight: 600; color: #4a5262; }
.el-table .el-table__row:hover > td.el-table__cell { background: #fdf6f6 !important; }

/* ---------------- 侧边栏布局 ---------------- */
.layout { height: 100vh; }

.layout__aside {
  background: var(--yl-sidebar);
  transition: width .25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 62px;
  flex: 0 0 62px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}
.logo__mark {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e05a5a, var(--yl-red));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(207, 46, 46, .45);
}
.logo__text {
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .5px;
}

.layout__menu { flex: 1; padding: 10px 0 20px; }
.menu-group { margin-bottom: 6px; }
.menu-group__title {
  padding: 12px 20px 6px;
  font-size: 11px;
  color: #6b7484;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  margin: 2px 10px;
  padding: 0 14px;
  border-radius: 8px;
  color: #b6bdca;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  transition: background .18s, color .18s;
  position: relative;
}
.menu-item:hover { background: var(--yl-sidebar-hover); color: #fff; }
.menu-item.is-active {
  background: linear-gradient(90deg, rgba(207, 46, 46, .92), rgba(207, 46, 46, .62));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(207, 46, 46, .32);
}
.menu-item__text { overflow: hidden; text-overflow: ellipsis; }

.layout__header {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid var(--yl-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 4px rgba(24, 32, 48, .04);
}
.header-left { display: flex; align-items: center; gap: 14px; }
.collapse-btn { cursor: pointer; color: #6b7484; transition: color .2s; }
.collapse-btn:hover { color: var(--yl-red); }
.header-title { margin: 0; font-size: 17px; font-weight: 600; }

.header-right { display: flex; align-items: center; gap: 6px; }
.header-date { font-size: 13px; color: var(--yl-text-sub); }
.user-info { display: flex; align-items: center; gap: 8px; cursor: pointer; outline: none; }
.user-avatar { background: linear-gradient(135deg, #e05a5a, var(--yl-red)); color: #fff; font-weight: 600; }
.user-name { font-size: 13.5px; color: var(--yl-text); }

.layout__main {
  background: var(--yl-bg);
  padding: 18px;
  overflow-y: auto;
}

/* ---------------- 登录页 ---------------- */
.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(130deg, #8e1c1c 0%, #cf2e2e 45%, #e0632e 100%);
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, .16) 0, transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(255, 215, 110, .18) 0, transparent 46%);
}
.login-box {
  position: relative;
  z-index: 2;
  display: flex;
  width: 900px;
  max-width: 94vw;
  min-height: 470px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.login-left {
  flex: 1.05;
  padding: 46px 40px;
  color: #fff;
  background: linear-gradient(155deg, #a62525 0%, #cf2e2e 60%, #d94a2a 100%);
  position: relative;
  overflow: hidden;
}
.login-left::after {
  content: '';
  position: absolute;
  right: -70px; bottom: -70px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.login-emblem { margin-bottom: 20px; }
.login-left h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: 2px; font-weight: 700; }
.login-left__sub { margin: 0 0 30px; font-size: 12px; opacity: .68; letter-spacing: 1px; }
.login-feature { list-style: none; padding: 0; margin: 0; }
.login-feature li {
  font-size: 13.5px;
  opacity: .92;
  padding: 9px 0 9px 22px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.login-feature li::before {
  content: '';
  position: absolute;
  left: 2px; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--yl-gold);
}

.login-right { flex: 1; padding: 52px 46px; display: flex; flex-direction: column; justify-content: center; }
.login-right h2 { margin: 0 0 6px; font-size: 23px; }
.login-right__sub { margin: 0 0 26px; font-size: 13px; color: var(--yl-text-sub); }
.login-btn { width: 100%; letter-spacing: 4px; font-weight: 600; }
.login-demo {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--yl-text-sub);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #fafbfd;
  border: 1px dashed var(--yl-border);
  border-radius: 8px;
}
.login-footer {
  position: absolute;
  bottom: 20px;
  z-index: 2;
  color: rgba(255, 255, 255, .72);
  font-size: 12.5px;
  letter-spacing: 1px;
}

/* ---------------- 看板列表 ---------------- */
.timeline-list, .notice-list, .rank-list { list-style: none; margin: 0; padding: 0; }
.timeline-list li {
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--yl-border);
}
.timeline-list li:last-child { border-bottom: none; }
.tl-date {
  flex: 0 0 62px;
  text-align: center;
  border-radius: 8px;
  background: var(--yl-red-light);
  padding: 5px 0;
  height: fit-content;
}
.tl-day { display: block; font-size: 13px; font-weight: 700; color: var(--yl-red); }
.tl-time { display: block; font-size: 11px; color: #b06a6a; }
.tl-body { min-width: 0; flex: 1; }
.tl-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meta { font-size: 12px; color: var(--yl-text-sub); display: flex; align-items: center; gap: 6px; }
.dot { color: #ccd2dc; }

.notice-list li {
  display: flex;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--yl-border);
}
.notice-list li:last-child { border-bottom: none; }
.notice-dot {
  flex: 0 0 7px; width: 7px; height: 7px;
  border-radius: 50%;
  background: #ccd2dc;
  margin-top: 7px;
}
.notice-dot.is-top { background: var(--yl-red); box-shadow: 0 0 0 3px rgba(207, 46, 46, .14); }
.notice-body { min-width: 0; flex: 1; }
.notice-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.notice-meta { font-size: 12px; color: var(--yl-text-sub); }

.rank-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--yl-border);
}
.rank-list li:last-child { border-bottom: none; }
.rank-no {
  flex: 0 0 22px; width: 22px; height: 22px;
  border-radius: 6px;
  background: #eef0f4;
  color: #8a9099;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rank-no--1 { background: linear-gradient(135deg, #f5b942, #e79a12); color: #fff; }
.rank-no--2 { background: linear-gradient(135deg, #b9c3d1, #8d99ab); color: #fff; }
.rank-no--3 { background: linear-gradient(135deg, #dba06a, #c07f42); color: #fff; }
.rank-body { flex: 1; min-width: 0; }
.rank-title { font-size: 13.5px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-meta { font-size: 11.5px; color: var(--yl-text-sub); }
.rank-value { font-size: 12.5px; color: var(--yl-text-sub); white-space: nowrap; }

/* ---------------- 知识库 ---------------- */
.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.category-chip {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  background: #f4f6fa;
  color: #5a6270;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s;
  user-select: none;
}
.category-chip:hover { background: var(--yl-red-light); color: var(--yl-red); }
.category-chip.active {
  background: linear-gradient(135deg, #e05a5a, var(--yl-red));
  color: #fff;
  box-shadow: 0 3px 10px rgba(207, 46, 46, .3);
}
.chip-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .07);
  font-size: 11px;
  text-align: center;
}
.category-chip.active .chip-count { background: rgba(255, 255, 255, .28); }

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
  min-height: 120px;
}
.knowledge-card {
  border: 1px solid var(--yl-border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.knowledge-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(24, 32, 48, .1);
  border-color: #f0c4c4;
}
.knowledge-card__top { height: 4px; }
.knowledge-card__body { padding: 14px 15px 10px; flex: 1; }
.knowledge-card__title {
  margin: 9px 0 7px;
  font-size: 14.5px;
  line-height: 1.45;
  height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.knowledge-card__summary {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--yl-text-sub);
  line-height: 1.6;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.knowledge-card__foot {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #a8aeb8;
}
.knowledge-card__foot span { display: inline-flex; align-items: center; gap: 3px; }
.knowledge-card__ops {
  border-top: 1px dashed var(--yl-border);
  padding: 4px 10px;
  display: flex;
  justify-content: flex-end;
}

.knowledge-detail__head h3 { margin: 8px 0 0; font-size: 18px; line-height: 1.5; }
.knowledge-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12.5px;
  color: var(--yl-text-sub);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yl-border);
  margin-bottom: 14px;
}
.knowledge-detail__summary {
  background: var(--yl-red-light);
  border-left: 3px solid var(--yl-red);
  border-radius: 4px;
  padding: 11px 14px;
  font-size: 13px;
  color: #7a4a4a;
  margin: 0 0 14px;
}
.knowledge-detail__content { font-size: 14px; color: #3d4450; }

/* ---------------- 详情抽屉 ---------------- */
.detail-wrap { padding: 0 4px 20px; }
.detail-head { display: flex; gap: 8px; }
.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(120deg, #fdf3f3, #fafbfd);
  border: 1px solid #f4e2e2;
}
.profile__avatar {
  width: 56px; height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e05a5a, var(--yl-red));
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(207, 46, 46, .3);
}
.profile__info h3 { margin: 0 0 5px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.profile__info p { margin: 0; font-size: 13px; color: var(--yl-text-sub); }

/* ---------------- 报表 ---------------- */
.report-tabs .el-tabs__header { margin-bottom: 16px; }
.report-tabs .el-tabs__item { font-size: 14.5px; font-weight: 500; }

/* ---------------- 过渡动画 ---------------- */
.fade-enter-active, .fade-leave-active { transition: opacity .2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

.fade-slide-enter-active { transition: all .26s ease; }
.fade-slide-leave-active { transition: all .16s ease; }
.fade-slide-enter-from { opacity: 0; transform: translateY(10px); }
.fade-slide-leave-to { opacity: 0; transform: translateY(-6px); }

/* ---------------- 滚动条 ---------------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d2d8e2; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b8c0cd; }
.layout__aside ::-webkit-scrollbar-thumb { background: #39415280; }

/* ---------------- 多语言切换 ---------------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #5a6270;
  height: auto;
  padding: 0 4px;
}
.lang-switch:hover { color: var(--yl-red); }
.logo__brand {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .48);
}
.login-lang {
  position: absolute;
  top: 20px;
  right: 26px;
  z-index: 3;
}
.login-lang .lang-switch { color: rgba(255, 255, 255, .82); }
.login-lang .lang-switch:hover { color: #fff; }

/* ---------------- 首页门户 ---------------- */
.portal-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  padding: 26px 30px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(166, 37, 37, .22);
}
.portal-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #a62525 0%, #cf2e2e 45%, #e0663f 100%);
  /* 配图由 YL.images 注入，需要 cover 才能铺满横幅 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.portal-hero__bg::after {
  content: '';
  position: absolute;
  right: -70px; top: -90px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255, 215, 110, .16);
}
.portal-hero__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.portal-hero__left { display: flex; align-items: center; gap: 16px; }
.portal-hero__emblem {
  width: 62px; height: 62px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.portal-hero__title { margin: 0 0 6px; font-size: 25px; font-weight: 700; letter-spacing: 1px; }
.portal-hero__slogan { margin: 0; font-size: 13px; opacity: .88; letter-spacing: .5px; }
.portal-hero__stats { display: flex; gap: 30px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat__value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.hero-stat__value span { font-size: 12px; font-weight: 400; opacity: .8; margin-left: 2px; }
.hero-stat__label { margin-top: 5px; font-size: 12px; opacity: .82; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.module-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--yl-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all .2s;
}
.module-card:hover {
  border-color: #f1c0c0;
  box-shadow: 0 6px 18px rgba(207, 46, 46, .12);
  transform: translateY(-2px);
}
.module-card__icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  /* 图标底色由 YL.images 注入 AI 配图 + 主题色蒙版，保证图标始终清晰可辨 */
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.module-card__body { flex: 1; min-width: 0; }
.module-card__title {
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 600; margin-bottom: 4px;
}
.module-card__no {
  font-size: 11px;
  font-weight: 700;
  color: var(--yl-red);
  background: var(--yl-red-light);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 16px;
}
.module-card__desc {
  font-size: 12px;
  color: var(--yl-text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.module-card__arrow { color: #c8cedb; flex-shrink: 0; }
.module-card:hover .module-card__arrow { color: var(--yl-red); }

.portal-news { list-style: none; margin: 0; padding: 0; }
.portal-news li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--yl-border);
  font-size: 13.5px;
  cursor: pointer;
}
.portal-news li:last-child { border-bottom: none; }
.portal-news li:hover .portal-news__title { color: var(--yl-red); }
.portal-news__media { color: #b6bdcb; font-size: 13px; flex-shrink: 0; }
.portal-news__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .18s;
}
.portal-news__date { font-size: 12px; color: var(--yl-text-sub); flex-shrink: 0; }

.portal-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.portal-benefit {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(135deg, #fdf3f3, #fff);
  border: 1px solid #f6e2e2;
  cursor: pointer;
  transition: all .2s;
}
.portal-benefit__body { padding: 11px 14px 12px; }
.portal-benefit:hover { border-color: #f1c0c0; box-shadow: 0 5px 14px rgba(207, 46, 46, .1); }
.portal-benefit__cat {
  display: inline-block;
  font-size: 11px;
  color: var(--yl-red);
  background: #fff;
  border: 1px solid #f2cccc;
  border-radius: 4px;
  padding: 1px 7px;
  margin-bottom: 8px;
}
.portal-benefit__title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.portal-benefit__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--yl-text-sub);
}
.portal-benefit__meta span { display: inline-flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.portal-roles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.portal-role {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--yl-border);
  cursor: pointer;
  transition: all .2s;
}
.portal-role:hover { border-color: #f1c0c0; background: #fffafa; }
.portal-role__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  background-color: #e05a5a;
  background-size: cover;
  background-position: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.portal-role__body { min-width: 0; }
.portal-role__name { font-size: 14px; font-weight: 600; }
.portal-role__title { font-size: 12px; color: #5a6270; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-role__honor { font-size: 11.5px; color: var(--yl-red); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.portal-tree { padding: 4px 0; }
.portal-tree__node { display: flex; align-items: center; gap: 8px; width: 100%; font-size: 13px; }
.portal-tree__count { font-size: 11.5px; color: #fff; background: #d5dae3; border-radius: 9px; padding: 0 7px; line-height: 16px; }

/* ---------------- 团委动态 ---------------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--yl-border);
  cursor: pointer;
  transition: background .18s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover .news-item__text { color: var(--yl-red); }
.news-item__main { flex: 1; min-width: 0; }
.news-item__title { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.news-item__media { color: #b6bdcb; font-size: 13px; }
.news-item__text { font-size: 15px; font-weight: 600; transition: color .18s; }
.news-item__summary {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--yl-text-sub);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--yl-text-sub); flex-wrap: wrap; }
.news-item__ops { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }

.news-detail__head h3 { margin: 8px 0 0; font-size: 18px; line-height: 1.5; }
.news-detail__tags { margin-bottom: 8px; display: flex; gap: 6px; }
.news-detail__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
  color: var(--yl-text-sub);
}
.news-detail__content { font-size: 14px; color: #3d4450; }
.news-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8f9fc;
  border-radius: 8px;
  font-size: 12.5px;
}
.news-nav__item {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  color: #5a6270;
}
.news-nav__item:hover { color: var(--yl-red); }
.news-nav__item--next { text-align: right; }

.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 150px;
  margin: 14px 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #f6f7fb, #eef1f7);
  color: #9aa2b1;
  font-size: 12.5px;
}
.media-placeholder p { margin: 0; }

/* ---------------- 团委福利 ---------------- */
.benefit-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 4px;
  border-radius: 10px;
  border: 1px solid var(--yl-border);
  background: #fff;
  cursor: pointer;
  transition: all .2s;
  color: var(--c, var(--yl-red));
}
.benefit-cat:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .07); }
.benefit-cat.active {
  border-color: var(--c, var(--yl-red));
  box-shadow: 0 6px 16px rgba(0, 0, 0, .09);
}
.benefit-cat__text { min-width: 0; }
.benefit-cat__name { font-size: 14px; font-weight: 600; color: var(--yl-text); }
.benefit-cat__count { font-size: 12px; color: var(--yl-text-sub); margin-top: 3px; }

.filter-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 15px;
  background: var(--yl-red-light);
  color: var(--yl-red);
  font-size: 12.5px;
}
.filter-active__x { cursor: pointer; }

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
  gap: 14px;
  min-height: 120px;
}
.benefit-card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--yl-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.benefit-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: var(--c, var(--yl-red));
}
.benefit-card:hover {
  border-color: #f1c0c0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}
.benefit-card__head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.benefit-card__title { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.benefit-card__summary {
  margin: 0 0 12px;
  flex: 1;
  font-size: 12.5px;
  color: var(--yl-text-sub);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.benefit-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--yl-text-sub);
  border-top: 1px dashed var(--yl-border);
  padding-top: 10px;
}
.benefit-card__foot span { display: inline-flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.benefit-card__ops { position: absolute; right: 12px; bottom: 10px; display: none; gap: 2px; }
.benefit-card:hover .benefit-card__ops { display: flex; }
.benefit-card:hover .benefit-card__foot { visibility: hidden; }

/* ---------------- 团青风采 ---------------- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  min-height: 120px;
}
.role-card {
  position: relative;
  border: 1px solid var(--yl-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: all .2s;
}
.role-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .1); transform: translateY(-3px); }
.role-card__banner {
  position: relative;
  height: 86px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  /* 配图由 YL.images 注入，需要 cover 才能铺满横幅 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.role-card__avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #cf2e2e;
  font-size: 22px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.role-card__cat { position: absolute; right: 12px; top: 12px; }
.role-card__media { position: absolute; right: 12px; bottom: 10px; color: rgba(255, 255, 255, .85); font-size: 14px; }
.role-card__body { padding: 14px 16px 16px; }
.role-card__name { margin: 0 0 5px; font-size: 16px; }
.role-card__title { margin: 0 0 7px; font-size: 12.5px; color: #5a6270; }
.role-card__honor {
  margin: 0 0 8px;
  display: flex; align-items: center; gap: 4px;
  font-size: 12px;
  color: #e79a12;
}
.role-card__quote {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--yl-text-sub);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}
.role-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px dashed var(--yl-border);
  padding-top: 10px;
  font-size: 11.5px;
  color: var(--yl-text-sub);
}
.role-card__foot span { display: inline-flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-card__ops {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: none;
  gap: 2px;
  background: #fff;
}
.role-card:hover .role-card__ops { display: flex; }
.role-card:hover .role-card__foot { visibility: hidden; }

.role-detail__head h3 { margin: 8px 0 4px; font-size: 19px; }
.role-detail__subtitle { margin: 0; font-size: 12.5px; color: var(--yl-text-sub); }
.role-detail__hero {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fdf3f3, #f7f9fd);
  margin-bottom: 6px;
}
.role-detail__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e05a5a, var(--yl-red));
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.role-detail__heroinfo { min-width: 0; }
.role-detail__honor { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #e79a12; margin-bottom: 6px; }
.role-detail__org { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--yl-text-sub); flex-wrap: wrap; }
.role-detail__quote {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--yl-red);
  background: #fff;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #5a6270;
  line-height: 1.75;
}

.related-role-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.related-role {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--yl-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .18s;
}
.related-role:hover { border-color: #f1c0c0; background: #fffafa; }
.related-role__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e05a5a, var(--yl-red));
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.related-role__body { min-width: 0; }
.related-role__name { font-size: 13px; font-weight: 600; }
.related-role__meta { font-size: 11.5px; color: var(--yl-text-sub); }

.mb14 { margin-bottom: 14px; }

/* ---------------- AI 生成配图 ---------------- */
/* 通用容器：背景图由 YL.images 通过 :style 注入，尺寸与圆角由具体场景类决定 */
.yl-cover {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #eef1f6;
  overflow: hidden;
  flex-shrink: 0;
}

/* 列表项左侧缩略图 */
.yl-thumb {
  width: 116px;
  height: 80px;
  border-radius: 8px;
}
/* 紧凑列表（首页门户）用的小缩略图 */
.yl-thumb--sm {
  width: 76px;
  height: 54px;
  border-radius: 6px;
}

/* 卡片顶部封面（福利 / 风采 / 学习园地 / 活动） */
.yl-card-cover {
  height: 132px;
  width: 100%;
  border-radius: 10px 10px 0 0;
}
/* 紧凑卡片的顶部封面（首页门户福利卡） */
.yl-card-cover--sm {
  height: 96px;
  width: 100%;
}
/* 带内边距的卡片：封面通栏铺满（用于 .benefit-card 这类 padding:16px 的卡片） */
.yl-card-cover--bleed {
  margin: -16px -16px 12px;
}

/* 详情弹窗大图 */
.yl-detail-cover {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  margin-bottom: 14px;
}

/* 首页门户横幅 */
.yl-hero-bg {
  position: absolute;
  inset: 0;
}

/* 登录页背景照片 */
.yl-login-photo {
  position: absolute;
  inset: 0;
  opacity: .42;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 992px) {
  .login-left { display: none; }
  .login-box { width: 420px; min-height: auto; }
  .login-right { padding: 40px 32px; }
  .header-date { display: none; }
}

@media (max-width: 768px) {
  .layout__main { padding: 12px; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .filter-bar { padding: 12px 12px 0; }
  .module-grid, .benefit-grid, .role-grid, .portal-benefits, .portal-roles, .related-role-row { grid-template-columns: 1fr; }
  .portal-hero { padding: 20px; }
  .portal-hero__stats { gap: 20px; }
  .hero-stat__value { font-size: 21px; }
}

/* ---------------- 打印 ---------------- */
@media print {
  .layout__aside, .layout__header, .page-header__actions, .el-tabs__header { display: none !important; }
  .layout__main { padding: 0; background: #fff; }
  .panel { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  .stat-card { box-shadow: none; border: 1px solid #ddd; }
}
