/* ========================================
   学生处 · 机构设置补充样式
   ======================================== */

/* 重要通知飘窗 */
.sa-notice-popup {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 320px;
  background: #fff;
  border: 1px solid #eee5e2;
  border-top: 3px solid var(--color-primary);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(140, 28, 28, 0.12);
  animation: saPopupIn 0.4s ease;
}

.sa-notice-popup.hidden {
  display: none;
}

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

.sa-notice-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-bg-pink);
  border-bottom: 1px solid #eee5e2;
}

.sa-notice-popup-head strong {
  font-size: 14px;
  color: var(--color-primary);
}

.sa-notice-popup-close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
}

.sa-notice-popup-body {
  padding: 16px;
  font-size: 13px;
  line-height: 1.75;
  color: #555;
}

.sa-notice-popup-body a {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-primary);
}

.sa-notice-pin {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 2px;
  margin-right: 8px;
}

/* 思政教育 · 多媒体卡片 */
.sa-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sa-media-card {
  background: #fff;
  border: 1px solid #eee5e2;
  border-radius: 4px;
  overflow: hidden;
  color: inherit;
}

.sa-media-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.sa-media-card-body {
  padding: 14px 16px;
}

.sa-media-card-body h4 {
  font-size: 14px;
  font-weight: normal;
  color: #333;
  line-height: 1.55;
  margin-bottom: 6px;
}

.sa-media-card-body p {
  font-size: 12px;
  color: #999;
  line-height: 1.65;
}

.sa-media-card-body time {
  display: block;
  font-size: 11px;
  color: #bbb;
  margin-top: 8px;
}

.sa-counselor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sa-counselor-card {
  text-align: center;
  padding: 24px 16px;
  border: 1px solid #eee5e2;
  border-radius: 4px;
  background: #fafafa;
}

.sa-counselor-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
}

.sa-counselor-card h4 {
  font-size: 15px;
  color: #333;
  margin-bottom: 4px;
}

.sa-counselor-card .sa-counselor-title {
  font-size: 12px;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.sa-counselor-card .sa-counselor-dept {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
}

.sa-counselor-card blockquote {
  font-size: 13px;
  color: #666;
  line-height: 1.75;
  font-style: italic;
  border: none;
  padding: 0;
}

/* 学生管理 */
.sa-mgmt-tabs {
  margin-bottom: 20px;
}

.sa-reward-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px dashed #eee;
}

.sa-reward-item:last-child {
  border-bottom: none;
}

.sa-reward-type {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 2px;
}

.sa-reward-type.reward {
  background: rgba(140, 28, 28, 0.08);
  color: var(--color-primary);
}

.sa-reward-type.punish {
  background: #f5f5f5;
  color: #666;
}

/* 资助育人 */
.sa-aid-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sa-aid-card {
  padding: 18px;
  border: 1px solid #eee5e2;
  border-radius: 4px;
  background: #fff;
}

.sa-aid-card h4 {
  font-size: 14px;
  font-weight: normal;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.55;
}

.sa-aid-card .sa-aid-meta {
  font-size: 12px;
  color: #999;
}

/* 宿舍管理 · 瀑布流 */
.sa-masonry {
  column-count: 3;
  column-gap: 16px;
}

.sa-masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #eee5e2;
  background: #fff;
}

.sa-masonry-item img {
  width: 100%;
  display: block;
}

.sa-masonry-item figcaption {
  padding: 12px 14px;
  font-size: 13px;
  color: #444;
}

.sa-masonry-item time {
  display: block;
  font-size: 11px;
  color: #bbb;
  margin-top: 4px;
}

/* 心理健康 · 温馨色调 */
.sa-mental-page .about-content {
  --sa-warm-bg: #fdf8f5;
  --sa-warm-accent: #c4a882;
}

.sa-mental-booking {
  padding: 24px;
  background: linear-gradient(135deg, #fdf8f5, #faf5f0);
  border: 1px solid #efe6dc;
  border-radius: 8px;
  margin-bottom: 28px;
}

.sa-mental-booking h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  color: #8b6914;
  margin-bottom: 16px;
}

.sa-mental-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.sa-mental-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

.sa-mental-step-num {
  width: 24px;
  height: 24px;
  background: #c4a882;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.sa-mental-privacy {
  padding: 14px 18px;
  background: rgba(196, 168, 130, 0.12);
  border-left: 3px solid #c4a882;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.75;
  margin-top: 16px;
}

.sa-mental-contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  font-size: 14px;
  color: #555;
}

.sa-mental-contact p {
  margin: 0;
}

.sa-mental-dynamics .aa-textbook-item {
  border-color: #efe6dc;
  background: #fff;
}

/* 信息公开 · 新闻动态列表（机构页侧栏内容区） */
.sa-disclosure-news.news-list {
  border: 1px solid #eee5e2;
  border-radius: 4px;
  background: #fff;
}

.sa-disclosure-news.news-list.layout-thumb .news-item {
  padding: 18px 20px;
  border-bottom: 1px dashed #eee;
  align-items: flex-start;
}

.sa-disclosure-news.news-list.layout-thumb .news-item:last-child {
  border-bottom: none;
}

.sa-disclosure-news.news-list.layout-thumb .news-item-thumb {
  width: 168px;
  height: 112px;
  border-radius: 4px;
}

.sa-disclosure-news .news-item-body {
  flex: 1;
  min-width: 0;
}

.sa-disclosure-news .news-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 992px) {
  .sa-disclosure-news.news-list.layout-thumb .news-item-thumb {
    width: 140px;
    height: 94px;
  }
}

@media (max-width: 640px) {
  .sa-disclosure-news.news-list.layout-thumb .news-item {
    flex-direction: column;
    padding: 16px;
  }

  .sa-disclosure-news.news-list.layout-thumb .news-item-thumb {
    width: 100%;
    height: 160px;
  }
}

/* 信息公开 · 异步加载占位 */
.sa-loading {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 14px;
}

/* 文档操作按钮组 */
.po-doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.po-doc-btn {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 3px;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1.4;
}

.po-doc-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.po-doc-btn-secondary {
  color: #666;
  border-color: #ddd;
}

.po-doc-actions .po-doc-download {
  margin: 0;
}

/* 列表 · 分页 */
.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled),
.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-info {
  font-size: 13px;
  color: #999;
  margin: 0 8px;
}

@media (max-width: 992px) {
  .sa-media-grid,
  .sa-counselor-grid,
  .sa-aid-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sa-masonry {
    column-count: 2;
  }

  .sa-mental-contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sa-media-grid,
  .sa-counselor-grid,
  .sa-aid-grid {
    grid-template-columns: 1fr;
  }

  .sa-masonry {
    column-count: 1;
  }

  .sa-notice-popup {
    right: 12px;
    left: 12px;
    width: auto;
  }
}
