/* 通知预览、公告、用户留言和后台消息管理。 */

/* ===== 横幅下最新消息预览 ===== */
.ann-preview-wrap { margin: 0.5rem 0 0.75rem; display: flex; align-items: center; gap: 8px; background: #f8fafc; border-radius: 10px; padding: 0.45rem 0.75rem; border: 1px solid var(--gray-100); cursor: pointer; }

.ann-preview-wrap:hover { background: #f1f5f9; }

.ann-preview-label { display: flex; align-items: center; gap: 5px; flex-shrink: 0; font-size: 0.82rem; font-weight: 700; color: var(--primary); white-space: nowrap; }

.ann-preview-label img { width: 20px; height: 20px; }

.ann-preview-scroll { flex: 1; overflow: hidden; position: relative; height: 1.4em; }

.ann-preview-track { display: flex; gap: 24px; animation: annScroll 20s linear infinite; width: max-content; }

.ann-preview-track:hover { animation-play-state: paused; }

.ann-preview-item { white-space: nowrap; font-size: 0.82rem; color: var(--gray-600); display: flex; align-items: center; gap: 6px; }

.ann-preview-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }

.ann-preview-dot.important { background: #ef4444; }

.ann-preview-empty { font-size: 0.82rem; color: var(--gray-400); }

@keyframes annScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

@media (max-width: 600px) {
  .ann-preview-wrap { padding: 0.35rem 0.75rem; }

  .ann-preview-label { font-size: 0.75rem; }

  .ann-preview-item { font-size: 0.75rem; }
}

@media (max-width: 768px) {
  .msg-user-head { padding: 1rem 1.25rem; }

  .msg-user-card .msg-user-body { padding: 1rem 1.25rem; }

  .ann-card { padding: 1rem 1.25rem; }

  .ann-admin-item { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ===== 留言板样式 ===== */
.msg-user-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

.msg-user-head {
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 50%, #e0e7ff 100%);
  padding: 1.4rem 1.8rem;
  border-bottom: 1px solid #c7d2fe;
  display: flex; align-items: center; gap: 14px;
}

.msg-user-head-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}

.msg-user-head-icon svg {
  width: 20px; height: 20px;
  fill: none; stroke: #fff; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.msg-user-head-text { flex: 1; min-width: 0; }

.msg-user-head-title { font-size: 1.05rem; font-weight: 700; color: #1e293b; }

.msg-user-head-desc {
  font-size: 0.8rem; color: #64748b;
  margin: 2px 0 0;
}

.msg-user-body { padding: 1.5rem 1.8rem 1.8rem; }

.msg-user-body textarea {
  width: 100%; padding: 14px 18px;
  border: 1.8px solid #e2e8f0; border-radius: 14px;
  font-size: 0.9rem; font-family: inherit; line-height: 1.8;
  outline: none; resize: vertical; min-height: 130px;
  box-sizing: border-box;
  transition: all .2s;
  background: #fafbfc;
  color: #1e293b;
}

.msg-user-body textarea:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.msg-user-body textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
  background: #fff;
}

.msg-user-body textarea::placeholder { color: #b0b8c4; }

.msg-user-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px;
}

.msg-user-count {
  font-size: 0.78rem; color: #b0b8c4;
  font-weight: 500;
}

.msg-submit-btn {
  padding: 10px 32px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff; font-size: 0.88rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(79,70,229,0.25);
}

.msg-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.35);
  background: linear-gradient(135deg, #4338ca, #4f46e5);
}

.msg-submit-btn:active { transform: translateY(0) scale(0.97); }

.msg-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.msg-submit-btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* 管理员留言列表 */
.msg-mgmt-wrap {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #eef2f6;
  overflow: hidden;
}

.msg-item {
  display: flex; align-items: stretch;
  border-bottom: 1px solid #f1f5f9;
  transition: all .2s;
  position: relative;
}

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

.msg-item:hover { background: #fafcfd; }

.msg-item.unread { background: linear-gradient(135deg, #f0f7ff, #fafcff); }

.msg-item.unread::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #4f46e5, #6366f1);
  border-radius: 0 3px 3px 0;
}

.msg-item-check {
  display: flex; align-items: flex-start;
  padding: 18px 0 18px 18px;
}

.msg-item-check input[type=checkbox] {
  width: 18px; height: 18px; margin-top: 3px;
  accent-color: #4f46e5; cursor: pointer;
  border-radius: 4px;
}

.msg-item-body {
  flex: 1; padding: 16px 20px 16px 14px;
  min-width: 0;
}

.msg-item-top {
  display: flex; justify-content: space-between;
  align-items: baseline; gap: 8px; margin-bottom: 6px;
}

.msg-item-user { display: flex; align-items: center; gap: 10px; }

.msg-item-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.msg-item-avatar._0 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }

.msg-item-avatar._1 { background: linear-gradient(135deg, #6366f1, #06b6d4); }

.msg-item-avatar._2 { background: linear-gradient(135deg, #10b981, #14b8a6); }

.msg-item-avatar._3 { background: linear-gradient(135deg, #f59e0b, #f97316); }

.msg-item-avatar._4 { background: linear-gradient(135deg, #ef4444, #ec4899); }

.msg-item-name { font-weight: 700; font-size: 0.88rem; color: #1e293b; }

.msg-item-meta-tags { display: flex; gap: 6px; align-items: center; }

.msg-item-tag {
  font-size: 0.7rem; padding: 2px 10px; border-radius: 99px;
  font-weight: 600;
}

.msg-item-tag.grade {
  background: #eef2ff; color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.msg-item-tag.phone {
  background: #f0fdf4; color: #059669;
  border: 1px solid #a7f3d0;
}

.msg-item-time {
  font-size: 0.73rem; color: #94a3b8; flex-shrink: 0;
  font-weight: 500;
}

.msg-item-text {
  font-size: 0.9rem; color: #475569; line-height: 1.8;
  white-space: pre-wrap; word-break: break-word;
  margin-bottom: 10px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.msg-item-actions { display: flex; gap: 8px; }

.msg-item-del {
  padding: 6px 18px; border-radius: 8px; border: 1.5px solid #fecaca;
  font-size: 0.75rem; font-weight: 700; cursor: pointer;
  font-family: inherit;
  background: #fff; color: #dc2626;
  transition: all .2s;
}

.msg-item-del:hover { background: #fef2f2; border-color: #ef4444; transform: translateY(-1px); }

.msg-item-del:active { transform: translateY(0) scale(0.97); }

.msg-empty { text-align: center; padding: 4rem 1rem; color: #94a3b8; font-size: 0.9rem; }

.msg-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.msg-bar label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.83rem; cursor: pointer; color: #475569;
  padding: 6px 14px; border-radius: 8px;
  user-select: none;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  transition: all .15s;
}

.msg-bar label:hover { background: #f1f5f9; border-color: #cbd5e1; }

.msg-batch-bar {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.83rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  padding: 4px 6px 4px 14px;
  border-radius: 10px;
}

#msg-batch-count { font-weight: 600; color: #4f46e5; }

.msg-item-actions .msg-item-del.batch-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 6px 18px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

.msg-item-actions .msg-item-del.batch-btn:hover { background: #b91c1c; }

/* 筛选标签 */
.msg-filter-tabs {
  display: flex; gap: 4px;
  background: #f1f5f9; border-radius: 10px;
  padding: 3px;
}

.msg-filter-tab {
  padding: 5px 16px; border: none; border-radius: 8px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  font-family: inherit; background: transparent; color: #64748b;
  transition: all .15s;
}

.msg-filter-tab:hover { color: #334155; }

.msg-filter-tab.active {
  background: #fff; color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 回复区域 */
.msg-reply-section {
  margin-top: 10px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 10px;
}

.msg-reply-display {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px;
  background: #f0fdf4; border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.msg-reply-avatar {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: #fff; font-weight: 700; flex-shrink: 0;
}

.msg-reply-content { flex: 1; font-size: 0.85rem; color: #065f46; line-height: 1.7; }

.msg-reply-meta { font-size: 0.7rem; color: #6ee7b7; margin-top: 2px; }

.msg-reply-form { display: flex; gap: 8px; align-items: flex-start; }

.msg-reply-form textarea {
  flex: 1; padding: 9px 14px;
  border: 1.8px solid #d1fae5; border-radius: 10px;
  font-size: 0.82rem; font-family: inherit; line-height: 1.6;
  outline: none; resize: vertical; min-height: 48px;
  background: #fafdfc;
  transition: all .2s;
  box-sizing: border-box;
}

.msg-reply-form textarea:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.08);
  background: #fff;
}

.msg-reply-form textarea::placeholder { color: #a7f3d0; }

.msg-reply-btn {
  padding: 8px 18px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; font-size: 0.78rem; font-weight: 700;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
  transition: all .15s;
  box-shadow: 0 2px 8px rgba(16,185,129,0.2);
}

.msg-reply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}

.msg-reply-delete {
  font-size: 0.7rem; color: #94a3b8; cursor: pointer;
  padding: 2px 8px; border-radius: 6px; border: none;
  background: transparent; font-family: inherit;
  transition: all .15s;
}

.msg-reply-delete:hover { color: #ef4444; background: #fef2f2; }

/* 用户端留言历史 */
.my-msg-list { margin-top: 1.2rem; }

.my-msg-item {
  background: #fff; border-radius: 14px;
  padding: 1rem 1.2rem; margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  transition: all .15s;
}

.my-msg-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.my-msg-time { font-size: 0.75rem; color: #94a3b8; margin-bottom: 6px; }

.my-msg-content {
  font-size: 0.9rem; color: #475569; line-height: 1.75;
  padding: 8px 14px; background: #f8fafc;
  border-radius: 10px; border: 1px solid #f1f5f9;
}

.my-msg-reply {
  margin-top: 8px; padding: 10px 14px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-radius: 10px; border: 1px solid #bbf7d0;
  display: flex; gap: 10px; align-items: flex-start;
}

.my-msg-reply-avatar {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; color: #fff; font-weight: 700; flex-shrink: 0;
}

.my-msg-reply-body { flex: 1; font-size: 0.85rem; color: #065f46; line-height: 1.7; }

.my-msg-reply-label { font-size: 0.7rem; color: #6ee7b7; font-weight: 600; margin-bottom: 2px; }

@media (max-width: 480px) {
  .msg-user-head { padding: 0.8rem 1rem; }

  .msg-user-card .msg-user-body { padding: 0.8rem 1rem; }

  .ann-card { padding: 0.8rem 1rem; }
}

.news-notes .user-page-note-icon { background: #eef2ff; color: #4f46e5; }

.announcements-panel {
  background: #fff; border: 1px solid #e5eaf2; border-radius: 20px;
  box-shadow: 0 14px 34px rgba(30,41,59,0.07); overflow: hidden;
}

.announcements-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 1rem 1.35rem; border-bottom: 1px solid #eef2f6;
  background: linear-gradient(135deg, #fff, #fbfcff);
}

.announcements-panel-title,
.announcements-panel-subtitle { display: block; }

.announcements-panel-title { color: #1e293b; font-size: 0.92rem; font-weight: 800; }

.announcements-panel-subtitle { margin-top: 2px; color: #94a3b8; font-size: 0.7rem; }

.ann-refresh {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px;
  border: 1px solid #c7d2fe; border-radius: 9px; background: #eef2ff; color: #4f46e5;
  font-size: 0.72rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: all .18s;
}

.ann-refresh svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ann-refresh:hover { background: #e0e7ff; border-color: #a5b4fc; transform: translateY(-1px); }

#announcements-list { padding: 0.85rem 1rem 1rem; background: #fbfcfe; }

.ann-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 210px; padding: 2.5rem 1rem; color: #64748b; text-align: center;
}

.ann-empty-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  margin-bottom: 5px; border-radius: 15px; background: #eef2ff; color: #6366f1;
  font-size: 1.2rem; font-weight: 800; box-shadow: 0 8px 18px rgba(79,70,229,0.1);
}

.ann-empty-icon img { width: 30px; height: 30px; object-fit: contain; opacity: 0.7; }

.ann-empty strong { color: #475569; font-size: 0.88rem; }

.ann-empty small { color: #a0aec0; font-size: 0.72rem; }

.ann-empty.ann-error .ann-empty-icon { background: #fef2f2; color: #dc2626; box-shadow: none; }

.ann-card {
  background: linear-gradient(135deg, #fff 0%, #fafbff 100%); border-radius: 16px; padding: 1.05rem 1.15rem 0.9rem;
  margin-bottom: 0.65rem; cursor: pointer; border: 1px solid #e8edf5; border-left: 3px solid #c7d2fe;
  box-shadow: 0 3px 10px rgba(30,41,59,0.045); transition: all .2s; position: relative; overflow: hidden;
}

.ann-card:last-child { margin-bottom: 0; }

.ann-card:hover { border-color: #c7d2fe; box-shadow: 0 8px 20px rgba(79,70,229,0.1); transform: translateY(-2px); }

.ann-card.ann-unread { border-left-color: #6366f1; background: linear-gradient(135deg, #fff, #f8f9ff); }

.ann-card.ann-important { background: linear-gradient(135deg, #fff8f8, #fff 75%); border-color: #fecaca; border-left-color: #f87171; }

.ann-card.ann-important:hover { border-color: #fca5a5; box-shadow: 0 8px 20px rgba(239,68,68,0.1); }

.ann-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 9px; }

.ann-card-title-wrap { display: flex; align-items: flex-start; gap: 9px; min-width: 0; flex: 1; }

.ann-card-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  flex: 0 0 32px; border-radius: 10px; background: #eef2ff;
}

.ann-card-icon img { width: 19px; height: 19px; object-fit: contain; }

.ann-important .ann-card-icon { background: #fef2f2; }

.ann-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; padding-top: 2px; color: #1e293b; font-size: 0.92rem; font-weight: 800; line-height: 1.45; }

.ann-card-title-text { min-width: 0; overflow-wrap: anywhere; }

.ann-dot { width: 7px; height: 7px; border-radius: 50%; background: #6366f1; flex: 0 0 7px; box-shadow: 0 0 0 3px rgba(99,102,241,0.14); }

.ann-badge-imp { display: inline-block; padding: 2px 7px; border-radius: 5px; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; font-size: 0.66rem; font-weight: 800; }

.ann-date { padding-top: 3px; color: #94a3b8; font-size: 0.7rem; font-weight: 600; flex-shrink: 0; }

.ann-card-body { padding-left: 41px; color: #64748b; font-size: 0.82rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }

.ann-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 11px 0 0 41px; padding-top: 9px; border-top: 1px solid #f1f5f9; }

.ann-card-state { padding: 2px 7px; border-radius: 99px; font-size: 0.66rem; font-weight: 800; }

.ann-card-state.unread { background: #eef2ff; color: #4f46e5; }

.ann-card-state.read { background: #f1f5f9; color: #94a3b8; }

.ann-card-action { color: #a0aec0; font-size: 0.68rem; }

.ann-card-footer { margin: 10px 0 0 41px; padding-top: 8px; color: #dc2626; border-top: 1px solid #fee2e2; font-size: 0.72rem; font-weight: 700; }

@media (max-width: 640px) {
  .announcements-panel-head { padding: 0.8rem 0.95rem; }

  .announcements-panel-subtitle { font-size: 0.66rem; }

  #announcements-list { padding: 0.7rem; }

  .ann-card { padding: 0.9rem 0.85rem 0.8rem; }

  .ann-card-top { gap: 6px; }

  .ann-card-title { font-size: 0.86rem; }

  .ann-card-body { padding-left: 0; margin-top: 8px; font-size: 0.78rem; }

  .ann-card-meta,
  .ann-card-footer { margin-left: 0; }

  .ann-date { font-size: 0.66rem; }
}

.ann-admin-wrap {
  background: #fff; border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  border: 1px solid #eef2f6; overflow: hidden;
}

.ann-admin-list { display: flex; flex-direction: column; }

.ann-admin-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #f1f5f9;
  transition: all .15s;
  background: #fff;
}

.ann-admin-item:last-child { border-bottom: none; }

.ann-admin-item:hover { background: linear-gradient(135deg, #fafbff, #f8f9ff); }

.ann-admin-left { flex: 1; min-width: 0; }

.ann-admin-title { font-size: 0.9rem; font-weight: 700; color: #1e293b; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }

.ann-admin-preview { font-size: 0.78rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ann-admin-date { font-size: 0.72rem; color: #cbd5e1; margin-top: 2px; }

.ann-admin-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: 12px; }

.ann-admin-btn {
  border-radius: 8px; border: 1px solid #e2e8f0;
  background: #fff; cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 18px; font-size: 0.8rem; font-weight: 600;
  font-family: inherit; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.ann-admin-btn.edit { color: #6366f1; background: #eef2ff; border-color: #c7d2fe; }

.ann-admin-btn.edit:hover { background: #e0e7ff; border-color: #a5b4fc; }

.ann-admin-btn.del { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

.ann-admin-btn.del:hover { background: #fee2e2; border-color: #fca5a5; }

@media (max-width: 600px) {
  .ann-admin-actions { gap: 4px; margin-left: 8px; }

  .ann-admin-btn { padding: 4px 10px; font-size: 0.75rem; }
}

/* 公告弹窗输入框 */
.ann-input {
  width: 100%; padding: 0.6rem 0.8rem;
  border: 1px solid #d1d9e6; border-radius: 10px;
  font-size: 0.88rem; font-family: inherit;
  outline: none; transition: border-color .2s; box-sizing: border-box;
}

.ann-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }

.message-notes .user-page-note-icon { background: #ecfdf5; color: #059669; font-size: 0.82rem; }

.msg-user-card { box-shadow: 0 14px 34px rgba(30,41,59,0.08); border-color: #dfe8e5; }

.msg-user-head { background: linear-gradient(135deg, #f0fdf9 0%, #ecfdf5 58%, #eff6ff 100%); border-bottom-color: #d5eee5; }

.msg-head-note {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  color: #059669; font-size: 0.72rem; font-weight: 700;
  white-space: nowrap;
}

.msg-head-note::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.msg-compose-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 0.55rem; }

.msg-compose-head strong,
.msg-compose-head span { display: block; }

.msg-compose-head strong { color: #1e293b; font-size: 0.88rem; }

.msg-compose-head div > span { margin-top: 2px; color: #94a3b8; font-size: 0.7rem; }

.msg-compose-limit { color: #94a3b8; font-size: 0.68rem; white-space: nowrap; }

.msg-user-count small { color: #b0b8c4; font-size: 0.68rem; }

.msg-submit-btn .msg-submit-label { display: inline-block; }

@media (max-width: 640px) {
  .msg-user-head { align-items: flex-start; flex-wrap: wrap; }

  .msg-head-note { margin-left: 56px; margin-top: -4px; }

  .msg-compose-head { align-items: flex-start; flex-direction: column; gap: 2px; }

  .msg-user-foot { align-items: stretch; gap: 10px; }

  .msg-submit-btn { justify-content: center; width: 100%; }
}

.ann-preview-wrap {
  border-color: rgba(99, 102, 241, 0.14);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

.message-card { box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07); }

.message-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.message-card { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }

#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

#tab-admin-announcements .ann-admin-wrap {
  display: grid;
  gap: 12px;
  padding: 1rem;
}

#tab-admin-announcements .ann-admin-item {
  border-radius: 16px;
  border-color: #e2e8f0;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#tab-admin-announcements .ann-admin-item:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 16px 34px rgba(15,23,42,0.1);
}

#tab-admin-announcements .ann-admin-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 0 4px #eef2ff;
}

#tab-admin-messages .section-header { align-items: stretch; }

#tab-admin-messages .msg-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#tab-admin-messages .msg-bar > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
}

#tab-admin-messages .msg-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.82rem;
}

#tab-admin-messages .msg-mgmt-wrap { padding: 1rem; }

#tab-admin-messages #admin-messages-list {
  display: grid;
  gap: 12px;
}

#tab-admin-messages .msg-item {
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#tab-admin-messages .msg-item:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 16px 34px rgba(15,23,42,0.1);
}

#tab-admin-messages .msg-item-avatar { box-shadow: 0 8px 18px rgba(15,23,42,0.12); }

#tab-admin-messages .msg-item-text {
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

#tab-announcements .announcements-panel,
#tab-announcements .user-page-note,
#tab-announcements .announcement-card,
#tab-announcements .ann-item { box-shadow: 0 12px 30px rgba(15,23,42,0.07); }

#tab-announcements .announcements-panel {
  border-radius: 22px;
  border: 1px solid rgba(226,232,240,0.95);
  overflow: hidden;
}

#tab-announcements .announcements-panel-head {
  background: linear-gradient(135deg, #ffffff, #eef2ff);
  border-bottom: 1px solid #e2e8f0;
}

#tab-announcements .announcement-card,
#tab-announcements .ann-item {
  border-radius: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#tab-announcements .announcement-card:hover,
#tab-announcements .ann-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15,23,42,0.1);
}

@media (max-width: 768px) {
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap { padding: 0.75rem; border-radius: 18px; }

  #tab-admin-messages .msg-item { border-radius: 16px; }
}

/* ===== Compact correction: restore desktop width and reduce empty spacing ===== */
@media (min-width: 769px) {
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-messages .msg-mgmt-wrap {
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
  }

  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap { padding: 0.85rem; }

  #tab-admin-messages .msg-item,
  #tab-admin-announcements .ann-admin-item {
    border-radius: 13px;
    box-shadow: 0 6px 16px rgba(15,23,42,0.045);
  }

  #tab-admin-messages .msg-item:hover,
  #tab-admin-announcements .ann-admin-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15,23,42,0.08);
  }
}

/* ===== Spacing correction: restore compact vertical rhythm ===== */
@media (min-width: 769px) {
  .ann-preview-wrap {
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    padding-top: 0.34rem;
    padding-bottom: 0.34rem;
  }

  .announcements-panel-head { margin-top: 0 !important; }

  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  #tab-admin-messages #admin-messages-list,
  #tab-admin-announcements .ann-admin-wrap { gap: 8px; }

  #tab-admin-messages .msg-item,
  #tab-admin-announcements .ann-admin-item {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  #tab-announcements .user-page-hero {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    margin-bottom: 0.6rem;
  }

  #tab-announcements .user-page-notes {
    margin-bottom: 0.65rem;
    gap: 0.55rem;
  }

  #tab-announcements .announcements-panel-head {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
}

.ann-preview-wrap {
  margin-top: 0.35rem !important;
  margin-bottom: 0.45rem !important;
}

.announcements-panel-head { margin-top: 0 !important; }

#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap,
#tab-announcements .announcements-panel { margin-top: 0 !important; }

#tab-admin-messages .msg-item,
#tab-admin-announcements .ann-admin-item,
#tab-announcements .user-page-note {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#tab-admin-messages #admin-messages-list,
#tab-announcements .user-page-notes { gap: 0.5rem !important; }

#tab-announcements .user-page-hero { margin-bottom: 0.5rem !important; }

#tab-announcements .user-page-notes { margin-bottom: 0.5rem !important; }

@media (min-width: 769px) {
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap { padding: 0.65rem !important; }
}

@media (max-width: 768px) {
  .ann-preview-wrap {
    padding: 0.32rem 0.6rem !important;
    margin: 0.32rem 0 0.42rem !important;
  }

  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-announcements .announcements-panel {
    padding: 0.6rem !important;
    border-radius: 14px !important;
    margin-bottom: 0.5rem !important;
  }

  #tab-admin-messages .msg-item,
  #tab-admin-announcements .ann-admin-item { border-radius: 12px !important; }

  #tab-announcements .user-page-hero {
    padding: 0.75rem !important;
    margin-bottom: 0.45rem !important;
    border-radius: 14px !important;
  }

  #tab-announcements .user-page-notes {
    gap: 0.4rem !important;
    margin-bottom: 0.45rem !important;
  }

  #tab-announcements .announcements-panel-head { padding: 0.55rem 0.7rem !important; }
}

.ann-preview-wrap,
.ann-card,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap,
#tab-announcements .announcements-panel { margin-top: 0 !important; }

.ann-preview-wrap { margin: 0.25rem 0 0.35rem !important; }

#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap,
#tab-announcements .announcements-panel { margin-bottom: 0.55rem !important; }

#tab-admin-messages #admin-messages-list,
#tab-admin-announcements .ann-admin-wrap,
#tab-announcements .user-page-notes { gap: 0.45rem !important; }

@media (min-width: 769px) {
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-messages .msg-mgmt-wrap { padding: 0.55rem !important; }
}

@media (max-width: 768px) {
  .ann-preview-wrap {
    margin: 0.22rem 0 0.35rem !important;
    padding: 0.42rem 0.65rem !important;
    min-height: 36px;
  }

  .ann-preview-label,
  .ann-preview-item,
  .ann-preview-empty { font-size: 0.82rem !important; }

  .ann-preview-label img { width: 22px !important; height: 22px !important; }

  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-announcements .announcements-panel {
    padding: 0.52rem !important;
    margin-bottom: 0.45rem !important;
  }
}

/* ===== Mobile compact headers: registrations and announcements ===== */
@media (max-width: 768px) {
  #tab-admin-announcements > .section-header {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.45rem !important;
    padding: 0.42rem 0.55rem !important;
    margin-bottom: 0.3rem !important;
    border-radius: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  #tab-admin-announcements > .section-header::before { width: 3px !important; }

  #tab-admin-announcements > .section-header .tab-icon {
    width: 20px !important;
    height: 20px !important;
    padding: 3px !important;
    margin-right: 3px !important;
    border-radius: 7px !important;
  }

  #tab-admin-announcements > .section-header .btn-export {
    flex: 0 0 auto !important;
    min-height: 28px !important;
    padding: 0.28rem 0.62rem !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }
}

/* ===== Mobile admin header icons unified ===== */
@media (max-width: 768px) {
  #tab-admin-announcements > .section-header .tab-icon,
  #tab-admin-messages > .section-header .tab-icon,
  #tab-admin-messages .msg-bar > span:first-child img {
    width: 28px !important;
    height: 28px !important;
    box-sizing: border-box !important;
    padding: 5px !important;
    margin: 0 6px 0 0 !important;
    border-radius: 10px !important;
    background: #eef2ff !important;
    box-shadow: inset 0 0 0 1px rgba(79,70,229,0.08) !important;
    object-fit: contain !important;
    vertical-align: middle !important;
    flex: 0 0 auto !important;
  }

  #tab-admin-announcements > .section-header,
  #tab-admin-messages > .section-header { align-items: center !important; }

  #tab-admin-messages .msg-bar > span:first-child {
    align-items: center !important;
    gap: 0 !important;
  }
}

/* ===== Admin messages desktop header icon unified ===== */
#tab-admin-messages .msg-bar > span:first-child img {
  width: 34px !important;
  height: 34px !important;
  box-sizing: border-box !important;
  padding: 7px !important;
  margin: 0 6px 0 0 !important;
  border-radius: 12px !important;
  background: #eef2ff !important;
  box-shadow: inset 0 0 0 1px rgba(79,70,229,0.08) !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  flex: 0 0 auto !important;
}

#tab-admin-messages .msg-bar > span:first-child {
  align-items: center !important;
  gap: 0 !important;
}

@media (max-width: 768px) {
  #tab-admin-messages .msg-bar > span:first-child img {
    width: 28px !important;
    height: 28px !important;
    padding: 5px !important;
    border-radius: 10px !important;
  }
}

/* ===== Mobile message management + board overflow fixes ===== */
.my-msg-card {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}

.my-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f6;
  background: linear-gradient(135deg, #ffffff, #fbfcff);
}

.my-msg-head > div { min-width: 0; }

.my-msg-head strong {
  display: block;
  color: #1e293b;
  font-size: 0.92rem;
  line-height: 1.35;
}

.my-msg-head span {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.my-msg-refresh {
  flex: 0 0 auto;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #059669;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.my-msg-empty {
  padding: 1.25rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.6;
}

.my-msg-empty.error { color: #dc2626; }

.my-msg-list { padding: 0.85rem 1rem 1rem; background: #fbfcfe; }

.my-msg-content,
.my-msg-reply-body,
.msg-user-head-title,
.msg-user-head-desc,
.msg-compose-head,
.msg-item-name,
.msg-item-text,
.ann-admin-title,
.ann-admin-preview {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.my-msg-content { white-space: pre-wrap; }

#tab-admin-announcements .ann-admin-left,
#tab-admin-messages .msg-item-user > div { min-width: 0; }

#tab-admin-announcements .ann-admin-title,
#tab-admin-messages .msg-item-meta-tags { flex-wrap: wrap; }

#tab-admin-announcements .ann-admin-actions,
#tab-admin-messages .msg-item-actions { display: flex !important; }

@media (max-width: 640px) {
  .msg-user-head,
  .msg-user-foot,
  .my-msg-head {
    align-items: stretch;
    flex-direction: column;
  }

  .msg-head-note,
  .msg-submit-btn,
  .my-msg-refresh { width: 100%; justify-content: center; }

  .my-msg-card { border-radius: 16px; margin-top: 0.75rem; }

  .my-msg-list { padding: 0.65rem; }

  .my-msg-item { padding: 0.85rem; margin-bottom: 0.6rem; }

  #tab-admin-announcements .ann-admin-item {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 0.85rem !important;
  }

  #tab-admin-announcements .ann-admin-left {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  #tab-admin-announcements .ann-admin-preview {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.6 !important;
  }

  #tab-admin-announcements .ann-admin-actions {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  #tab-admin-announcements .ann-admin-btn {
    flex: 0 0 auto !important;
    min-width: 72px !important;
    min-height: 34px !important;
    padding: 6px 14px !important;
  }

  #tab-admin-messages .msg-item { align-items: flex-start !important; }

  #tab-admin-messages .msg-item-top {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  #tab-admin-messages .msg-item-actions {
    width: 100% !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
  }
}

/* ===== User message delete action ===== */
.my-msg-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.my-msg-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.my-msg-del:hover { background: #fee2e2; border-color: #fca5a5; }

.my-msg-del:active { transform: scale(0.97); }

@media (max-width: 640px) {
  .my-msg-actions { justify-content: stretch; }

  .my-msg-del { width: 100%; }
}

.ann-preview-wrap { margin-top: 0.16rem !important; margin-bottom: 0.22rem !important; }

.msg-user-card,
.my-msg-card,
.announcements-panel,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap { margin-top: 0 !important; }

.msg-user-card,
.my-msg-card,
.announcements-panel,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap { margin-bottom: 0.42rem !important; }

#tab-admin-messages #admin-messages-list,
#tab-admin-announcements .ann-admin-wrap,
#tab-announcements .user-page-notes { gap: 0.36rem !important; }

@media (max-width: 768px) {
  .ann-preview-wrap { margin: 0.12rem 0 0.18rem !important; min-height: 32px !important; }

  .msg-user-card,
  .my-msg-card,
  .announcements-panel,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-messages .msg-mgmt-wrap { margin-bottom: 0.32rem !important; }
}

/* ===== Compact my-message actions on mobile ===== */
@media (max-width: 640px) {
  .my-msg-head {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .my-msg-head > div {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .my-msg-refresh {
    width: auto !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    min-height: 28px !important;
    padding: 4px 10px !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }

  .my-msg-actions {
    justify-content: flex-end !important;
    margin-top: 0.5rem !important;
  }

  .my-msg-del {
    width: auto !important;
    min-height: 28px !important;
    padding: 4px 12px !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }
}

/* ===== User dashboard four tabs tighter spacing ===== */
#tab-announcements,
#tab-messages { --user-tab-gap: 0.28rem; }

#tab-announcements .user-page-hero,
#tab-messages .user-page-hero {
  min-height: 118px !important;
  margin: 0 0 var(--user-tab-gap) !important;
  padding: 1rem 1.2rem !important;
  border-radius: 18px !important;
}

#tab-announcements .user-page-eyebrow,
#tab-messages .user-page-eyebrow {
  margin-bottom: 0.3rem !important;
  padding: 0.2rem 0.52rem !important;
}

#tab-announcements .user-page-hero h2,
#tab-messages .user-page-hero h2 {
  margin: 0 !important;
  line-height: 1.28 !important;
}

#tab-announcements .user-page-hero p,
#tab-messages .user-page-hero p {
  margin-top: 0.22rem !important;
  line-height: 1.5 !important;
}

#tab-announcements .user-page-hero-mark,
#tab-messages .user-page-hero-mark {
  width: 86px !important;
  height: 86px !important;
  padding: 0.72rem !important;
  border-radius: 20px !important;
}

#tab-announcements .user-page-notes,
#tab-messages .user-page-notes {
  margin: 0 0 var(--user-tab-gap) !important;
  gap: 0.38rem !important;
}

#tab-announcements .user-page-note,
#tab-messages .user-page-note {
  padding: 0.58rem 0.7rem !important;
  border-radius: 13px !important;
}

#tab-announcements .announcements-panel,
#tab-messages .msg-user-card,
#tab-messages .my-msg-card {
  margin-top: 0 !important;
  margin-bottom: var(--user-tab-gap) !important;
  border-radius: 16px !important;
}

#tab-announcements .announcements-panel-head,
#tab-messages .msg-user-head,
#tab-messages .my-msg-head { padding: 0.68rem 0.9rem !important; }

#tab-announcements #announcements-list,
#tab-messages .msg-user-body,
#tab-messages .my-msg-list { padding: 0.62rem 0.72rem !important; }

#tab-announcements .ann-card,
#tab-messages .my-msg-item {
  margin-bottom: 0.42rem !important;
  padding-top: 0.72rem !important;
  padding-bottom: 0.72rem !important;
}

#tab-messages .msg-compose-head { margin-bottom: 0.45rem !important; }

#tab-messages .msg-user-body textarea { min-height: 108px !important; }

#tab-messages .msg-user-foot { margin-top: 0.55rem !important; }

@media (max-width: 768px) {
  #tab-announcements,
  #tab-messages { --user-tab-gap: 0.22rem; }

  #tab-announcements .user-page-hero,
  #tab-messages .user-page-hero {
    min-height: 96px !important;
    padding: 0.68rem 0.75rem !important;
    border-radius: 15px !important;
  }

  #tab-announcements .user-page-hero h2,
  #tab-messages .user-page-hero h2 { font-size: 1rem !important; }

  #tab-announcements .user-page-hero p,
  #tab-messages .user-page-hero p { font-size: 0.75rem !important; }

  #tab-announcements .user-page-hero-mark,
  #tab-messages .user-page-hero-mark {
    width: 58px !important;
    height: 58px !important;
    padding: 0.42rem !important;
    border-radius: 15px !important;
  }

  #tab-announcements .user-page-hero-mark span,
  #tab-messages .user-page-hero-mark span { display: none !important; }

  #tab-announcements .user-page-hero-mark strong,
  #tab-messages .user-page-hero-mark strong { font-size: 1rem !important; }

  #tab-announcements .user-page-note,
  #tab-messages .user-page-note {
    padding: 0.48rem 0.58rem !important;
    min-height: auto !important;
  }

  #tab-announcements .announcements-panel-head,
  #tab-messages .msg-user-head,
  #tab-messages .my-msg-head { padding: 0.55rem 0.68rem !important; }

  #tab-announcements #announcements-list,
  #tab-messages .msg-user-body,
  #tab-messages .my-msg-list { padding: 0.5rem 0.55rem !important; }

  #tab-announcements .ann-card,
  #tab-messages .my-msg-item {
    margin-bottom: 0.32rem !important;
    padding-top: 0.58rem !important;
    padding-bottom: 0.58rem !important;
  }

  #tab-messages .msg-user-body textarea { min-height: 92px !important; }
}

@media (max-width: 768px) {
  #tab-messages .my-msg-list,
  #tab-announcements #announcements-list { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important; }

  #tab-messages .my-msg-item:last-child,
  #tab-announcements .ann-card:last-child { margin-bottom: 0.85rem !important; }
}
