/* ===== 公告栏组件（login.html 与 dashboard 共用 _notice_board.html） ===== */
.notice-board {
  background: var(--bg-warm);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 24px 64px var(--shadow-strong);
}
.notice-header {
  font-size: 18px; letter-spacing: 4px;
  color: var(--brown-deep);
  text-align: center;
  margin-bottom: 24px;
}
.notice-main { padding: 4px 4px 8px; }
.notice-main-nth {
  margin-top: 28px; padding-top: 28px;
  border-top: 2px solid var(--brown-light);  /* 粗分隔线，一眼看出第二条 */
}
.notice-img-wrap {
  width: 100%;
  padding-top: 56.25%;   /* 16:9 等比容器，兼容性100% */
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-beige);
  margin-bottom: 12px;
}
.notice-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;    /* 非16:9自动裁切 */
}
.notice-title {
  font-size: 22px; font-weight: 700;
  color: var(--brown-deep); letter-spacing: 2px;
  text-align: center;
  margin-bottom: 4px;
}
.notice-date {
  font-size: 11px; color: var(--brown-mid);
  opacity: 0.6; letter-spacing: 1px;
  margin-bottom: 10px;
}
.notice-body {
  font-size: 13px; color: var(--brown-mid);
  line-height: 1.7; letter-spacing: 0.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
.notice-empty {
  text-align: center; padding: 48px 20px;
  color: var(--brown-mid); opacity: 0.4;
  font-size: 14px; letter-spacing: 2px;
}

/* ===== 公告网格：登录页单列，dashboard 桌面端多列卡片 ===== */
.notice-grid {
  display: grid;
  grid-template-columns: 1fr;
}
/* dashboard 桌面端：每行4条公告，独立卡片 */
.dashboard-aside .notice-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.dashboard-aside .notice-main {
  background: var(--white);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 10px var(--shadow);
}
.dashboard-aside .notice-main-nth {
  margin-top: 0; padding-top: 18px;
  border-top: none;  /* 并排卡片不需要分隔线 */
}
@media(max-width:768px){
  .dashboard-aside .notice-grid { grid-template-columns: 1fr; gap: 0; }
  .dashboard-aside .notice-main {
    background: transparent; padding: 4px 4px 8px; box-shadow: none;
  }
  .dashboard-aside .notice-main-nth {
    margin-top: 28px; padding-top: 28px;
    border-top: 2px solid var(--brown-light);  /* 手机端竖排恢复粗分隔线 */
  }
}

/* ===== 已读回执 ===== */
.notice-read-btn {
  width: 100%; padding: 12px;
  margin: 8px 0 20px;
  background: var(--red-accent); color: var(--white);
  border: none; border-radius: 8px;
  font-family: inherit; font-size: 15px; letter-spacing: 4px;
  cursor: pointer; transition: background 0.2s, opacity 0.2s;
}
.notice-read-btn:hover { background: #8B2A1A; }
.notice-read-btn.done {
  background: var(--bg-beige); color: var(--brown-mid);
  cursor: default;
}

.notice-reads {
  border-top: 1px dashed var(--bg-beige);
  padding-top: 16px;
}
.reads-title {
  font-size: 16px; font-weight: 700; letter-spacing: 2px;
  color: var(--brown-deep);
  margin-bottom: 12px;
}
.read-group { margin-bottom: 14px; }
.read-group-name {
  font-size: 12px; letter-spacing: 1px;
  color: var(--brown-light); font-weight: 500;
  margin-bottom: 6px;
}
.read-names {
  display: grid;
  grid-template-columns: repeat(4, auto);  /* 每行4个，列宽按名字自适应 */
  gap: 8px 12px;
  justify-content: start;  /* 不满4个左对齐 */
}
.read-name {
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; letter-spacing: 1px;
  white-space: nowrap;   /* 4字名字也强制单行，不换行 */
  text-align: center;
  background: #EDEDED; color: #999;   /* 未读：灰 */
  transition: all 0.25s;
}
.read-name.is-read {
  background: #E8F5E9; color: #2E7D32;  /* 已读：绿 */
  font-weight: 500;
}
