/* ============================================================
   Team Portal — Social Platform + Operations Dashboard
   Uses theme.css variables for light/dark support
   Mobile-first responsive design
   ============================================================ */

/* ── Page Shell ────────────────────────────────────────────── */
.team-shell {
  min-height: 100vh;
  background: var(--color-bg);
  font-family: var(--font-sans);
  color: var(--color-text);
}
.team-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
  position: relative;
  z-index: 1;
}

/* ── Team Header ───────────────────────────────────────────── */
.team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 1.25rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.25rem;
}
.team-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.team-header__logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.team-header__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}
.team-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.team-header__back {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}
.team-header__back:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* ── Profile Card ──────────────────────────────────────────── */
.profile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.profile-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-olive), #3a5f4e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.profile-card__info {
  flex: 1;
  min-width: 0;
}
.profile-card__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}
.profile-card__role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-top: 0.15rem;
}
.profile-card__stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.profile-card__stat {
  text-align: center;
}
.profile-card__stat-val {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}
.profile-card__stat-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

/* ── Badges ────────────────────────────────────────────────── */
.profile-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: var(--color-gold-soft);
  border: 1px solid rgba(217, 119, 54, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-gold);
}
.badge--earned {
  background: var(--color-olive-soft);
  border-color: rgba(44, 74, 62, 0.2);
  color: var(--color-olive);
}

/* ── Glass Card (shared) ───────────────────────────────────── */
.glass-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.glass-card:hover {
  box-shadow: var(--shadow-md);
}
.glass-card__title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Main Tabs ─────────────────────────────────────────────── */
.main-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}
.main-tabs::-webkit-scrollbar { display: none; }
.main-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 0.5rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease);
}
.main-tab:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}
.main-tab--active {
  background: var(--color-olive-soft);
  color: var(--color-olive);
  border-color: rgba(44, 74, 62, 0.2);
  font-weight: 700;
}
.main-tab__icon { font-size: 1rem; }

/* ── Tab Panels ────────────────────────────────────────────── */
.tab-panel { animation: fadeIn 0.2s ease both; }
.tab-panel[hidden] { display: none; }
.tab-panel--active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Stats Grid ────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: center;
}
.stat-card__val {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gold);
}
.stat-card__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

/* ── Event Banner ──────────────────────────────────────────── */
.event-banner {
  padding: 0.7rem 1rem;
  background: var(--color-gold-soft);
  border: 1px solid rgba(217, 119, 54, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.82rem;
  text-align: center;
  color: var(--color-text);
}
.event-banner strong { color: var(--color-gold); }

/* ── Chat Container ────────────────────────────────────────── */
.chat-container {
  display: flex;
  height: 440px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: var(--color-surface);
}
.chat-sidebar {
  width: 140px;
  background: var(--color-bg-subtle);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}
.chat-topic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--duration-fast);
  text-align: center;
}
.chat-topic:hover { background: var(--color-surface-hover); }
.chat-topic--active {
  background: var(--color-olive-soft);
  border-left: 3px solid var(--color-olive);
}
.chat-topic__icon { font-size: 1.3rem; }
.chat-topic__name {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-header {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg-subtle);
}
.chat-header__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}
.chat-header__sub {
  font-size: 0.68rem;
  color: var(--color-text-muted);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

/* ── Chat Messages ─────────────────────────────────────────── */
.chat-msg {
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.55;
  position: relative;
  word-wrap: break-word;
  animation: slideIn 0.25s var(--ease) both;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg--out {
  align-self: flex-end;
  background: var(--color-olive);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg--in {
  align-self: flex-start;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}
.chat-msg--system {
  align-self: center;
  background: var(--color-gold-soft);
  border: 1px solid rgba(217, 119, 54, 0.15);
  color: var(--color-gold);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
}
.chat-msg--prayer {
  border-left: 3px solid var(--color-gold);
  background: var(--color-gold-soft);
}
.chat-msg__author {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-olive);
  margin-bottom: 0.2rem;
  display: block;
}
.chat-msg__time {
  font-size: 0.58rem;
  opacity: 0.65;
  margin-top: 0.2rem;
  display: block;
}
.chat-msg__type {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.15rem;
}

/* ── Chat Compose ──────────────────────────────────────────── */
.chat-compose {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}
.chat-compose__input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  background: var(--color-surface);
  color: var(--color-text);
  margin: 0;
  outline: none;
  transition: border-color var(--duration-fast);
}
.chat-compose__input:focus { border-color: var(--color-olive); }
.chat-compose__btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-olive);
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast);
}
.chat-compose__btn:hover { transform: scale(1.08); }
.chat-compose__type {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  background: var(--color-surface);
  font-family: var(--font-sans);
}
.chat-compose__type:hover { border-color: var(--color-gold); color: var(--color-gold); }
@media (max-width: 500px) {
  .chat-sidebar { width: 54px; }
  .chat-topic__name { display: none; }
  .chat-container { height: 380px; }
}

/* ── Forum / Social Posts (Team) ───────────────────────────── */
.team-post {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.2s ease both;
}
.team-post__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.team-post__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-olive-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--color-olive);
  flex-shrink: 0;
}
.team-post__meta { flex: 1; }
.team-post__author { font-weight: 600; font-size: 0.85rem; color: var(--color-text); }
.team-post__time { font-size: 0.68rem; color: var(--color-text-muted); }
.team-post__type {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}
.team-post__type--prayer { background: var(--color-gold-soft); color: var(--color-gold); }
.team-post__type--thanksgiving { background: var(--color-success-soft); color: var(--color-success); }
.team-post__type--bible { background: var(--color-info-soft); color: var(--color-info); }
.team-post__type--discussion { background: var(--color-bg-subtle); color: var(--color-text-secondary); }
.team-post__body {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  white-space: pre-wrap;
}
.team-post__actions {
  display: flex;
  gap: 0.25rem;
  border-top: 1px solid var(--color-border);
  padding-top: 0.6rem;
}
.team-post__action {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  flex: 1;
  justify-content: center;
  transition: all var(--duration-fast);
}
.team-post__action:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.team-post__action.is-liked { color: var(--color-gold); }

/* ── Form Elements ─────────────────────────────────────────── */
.team-shell label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--color-text);
}
.team-shell input,
.team-shell select,
.team-shell textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: var(--font-sans);
  background: var(--color-surface);
  margin-bottom: 0.7rem;
  color: var(--color-text);
  -webkit-appearance: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.team-shell input:focus,
.team-shell select:focus,
.team-shell textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: var(--shadow-glow);
}
.team-shell textarea { resize: vertical; min-height: 60px; }

/* ── Buttons ───────────────────────────────────────────────── */
.team-shell .btn {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  margin-bottom: 0.5rem;
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.team-shell .btn:hover { transform: translateY(-1px); }
.team-shell .btn:active { transform: scale(0.98); }
.team-shell .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.team-shell .btn--gold { background: linear-gradient(135deg, var(--color-gold), #e08a42); color: #fff; box-shadow: 0 4px 16px rgba(217, 119, 54, 0.25); }
.team-shell .btn--green { background: linear-gradient(135deg, var(--color-olive), #3a5f4e); color: #fff; box-shadow: 0 4px 16px rgba(44, 74, 62, 0.25); }
.team-shell .btn--outline { background: var(--color-surface); border: 1.5px solid var(--color-border); color: var(--color-text-secondary); }
.team-shell .btn--outline:hover { border-color: var(--color-gold); color: var(--color-gold); }
.team-shell .btn--danger { background: linear-gradient(135deg, var(--color-danger), #c0392b); color: #fff; }
.team-shell .btn--sm { padding: 0.6rem 1rem; font-size: 0.82rem; width: auto; }

/* ── Views / Status ────────────────────────────────────────── */
.view { display: none; animation: fadeIn 0.2s ease both; }
.view.active { display: block; }
.status { text-align: center; font-size: 0.82rem; min-height: 1.2rem; margin-bottom: 0.5rem; }
.status--error { color: var(--color-danger); }
.status--success { color: var(--color-success); }
.toggle-link { font-size: 0.82rem; text-align: center; color: var(--color-text-muted); margin-top: 0.5rem; }
.toggle-link a { color: var(--color-gold); font-weight: 600; cursor: pointer; text-decoration: none; }

/* ── QR Scanner ────────────────────────────────────────────── */
.qr-toggle {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--color-gold), #e08a42);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 16px rgba(217, 119, 54, 0.25);
  transition: transform var(--duration-fast);
}
.qr-toggle:hover { transform: translateY(-1px); }
#qr-reader { width: 100%; min-height: 220px; display: none; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 0.75rem; }
#qr-reader.active { display: block; }
.qr-status { text-align: center; font-size: 0.82rem; color: var(--color-text-muted); min-height: 1.4rem; margin-bottom: 0.5rem; }
.qr-status.success { color: var(--color-success); font-weight: 600; }
.qr-status.error { color: var(--color-danger); }
.qr-confirm { display: none; padding: 1rem; background: var(--color-olive-soft); border: 1.5px solid var(--color-olive); border-radius: var(--radius-sm); margin-bottom: 0.75rem; text-align: center; }
.qr-confirm.active { display: block; }
.qr-confirm__name { font-weight: 700; font-size: 0.95rem; color: var(--color-text); margin: 0 0 0.25rem; }
.qr-confirm__id { font-size: 0.7rem; color: var(--color-gold); margin: 0 0 0.6rem; }
.qr-confirm__actions { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.scan-count { text-align: center; font-size: 0.72rem; color: var(--color-text-muted); margin-bottom: 0.75rem; }

/* ── Picker Modal ──────────────────────────────────────────── */
.picker-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 200; align-items: flex-end; justify-content: center; }
.picker-overlay.active { display: flex; }
.picker-sheet { background: var(--color-bg-elevated); border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: 100%; max-width: 520px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.picker-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); }
.picker-header__title { font-weight: 700; font-size: 1rem; margin: 0; color: var(--color-text); }
.picker-header__close { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--color-bg-subtle); border: 1px solid var(--color-border); font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); font-family: var(--font-sans); }
.picker-search { margin: 0.75rem 1.25rem; padding: 0.7rem 0.85rem; border: 1.5px solid var(--color-border); border-radius: 8px; font-size: 0.88rem; font-family: var(--font-sans); background: var(--color-bg-subtle); width: calc(100% - 2.5rem); color: var(--color-text); }
.picker-search:focus { outline: none; border-color: var(--color-gold); box-shadow: var(--shadow-glow); }
.picker-list { flex: 1; overflow-y: auto; padding: 0.5rem 1.25rem 1.25rem; }
.picker-item { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 0.85rem; border: 1.5px solid var(--color-border); border-radius: 8px; margin-bottom: 0.4rem; cursor: pointer; transition: border-color var(--duration-fast), background var(--duration-fast); }
.picker-item:hover { border-color: var(--color-gold); background: var(--color-gold-soft); }
.picker-item__name { font-weight: 600; font-size: 0.84rem; color: var(--color-text); }
.picker-item__id { font-size: 0.65rem; color: var(--color-text-muted); }

/* ── Emergency Banner ──────────────────────────────────────── */
.emergency-banner { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem 1.25rem; background: var(--color-danger-soft); border: 1.5px solid var(--color-danger); border-radius: var(--radius-sm); margin-bottom: 1rem; animation: emergencyPulse 3s ease-in-out infinite; }
@keyframes emergencyPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(166, 37, 31, 0.15); } 50% { box-shadow: 0 0 0 6px rgba(166, 37, 31, 0); } }
.emergency-banner__icon { font-size: 1.4rem; flex-shrink: 0; }
.emergency-banner__content { flex: 1; }
.emergency-banner__title { font-size: 0.88rem; font-weight: 700; color: var(--color-danger); display: block; margin-bottom: 0.2rem; }
.emergency-banner__body { font-size: 0.82rem; color: var(--color-text-secondary); line-height: 1.5; margin: 0; }
.emergency-banner__dismiss { background: none; border: none; color: var(--color-text-muted); font-size: 1.2rem; cursor: pointer; padding: 0.2rem; flex-shrink: 0; }
.emergency-banner__dismiss:hover { color: var(--color-danger); }

/* ── Training ──────────────────────────────────────────────── */
.training-module { padding: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.75rem; }
.training-module__check { width: 24px; height: 24px; border-radius: var(--radius-full); border: 2px solid var(--color-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.7rem; }
.training-module__check--done { background: var(--color-olive); border-color: var(--color-olive); color: #fff; }
.training-module__name { font-size: 0.85rem; font-weight: 600; color: var(--color-text); }
.training-module__desc { font-size: 0.72rem; color: var(--color-text-muted); margin-top: 0.15rem; }

/* ── Activity List ─────────────────────────────────────────── */
.activity-item { display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.84rem; }
.activity-item:last-child { border-bottom: none; }
.activity-item__name { font-weight: 600; flex: 1; color: var(--color-text); }
.activity-item__time { font-size: 0.7rem; color: var(--color-text-muted); margin-right: 0.5rem; }
.activity-item__rm { background: none; border: none; color: var(--color-text-muted); font-size: 0.85rem; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 4px; }
.activity-item__rm:hover { color: var(--color-danger); }

/* ── DM Contacts ───────────────────────────────────────────── */
.dm-contact { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 0.35rem; transition: background var(--duration-fast); }
.dm-contact:hover { background: var(--color-gold-soft); }
.dm-contact__avatar { width: 30px; height: 30px; border-radius: var(--radius-full); background: var(--color-gold-soft); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: var(--color-gold); flex-shrink: 0; }
.dm-contact__name { font-size: 0.84rem; font-weight: 600; color: var(--color-text); }

/* ── Announcements ─────────────────────────────────────────── */
.ann-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 0.6rem; }
.ann-item--urgent { border-left: 3px solid var(--color-warning); }
.ann-item--emergency { border-left: 3px solid var(--color-danger); }
.ann-item__priority { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: var(--radius-full); display: inline-block; margin-bottom: 0.4rem; }
.ann-item__priority--normal { background: var(--color-success-soft); color: var(--color-success); }
.ann-item__priority--urgent { background: var(--color-warning-soft); color: var(--color-warning); }
.ann-item__priority--emergency { background: var(--color-danger-soft); color: var(--color-danger); }
.ann-item__subject { font-weight: 700; font-size: 0.92rem; margin: 0 0 0.3rem; color: var(--color-text); }
.ann-item__body { font-size: 0.85rem; color: var(--color-text-secondary); line-height: 1.6; margin: 0; }
.ann-item__meta { font-size: 0.7rem; color: var(--color-text-muted); margin-top: 0.5rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 400px) {
  .main-tabs { gap: 0.25rem; }
  .main-tab { padding: 0.6rem 0.4rem; font-size: 0.72rem; }
  .profile-card { flex-direction: column; text-align: center; }
  .profile-card__stats { justify-content: center; }
}


/* ── Redesigned Chat Topic Sidebar ─────────────────────────── */
.chat-topic--active {
  background: var(--color-olive-soft) !important;
  border-left-color: var(--color-olive) !important;
}
.chat-topic:hover {
  background: var(--color-surface-hover);
}
.chat-topic:active {
  transform: scale(0.95);
}

/* ── Improved Chat Messages ────────────────────────────────── */
.chat-msg {
  animation: slideIn 0.2s var(--ease) both;
}
.chat-msg--out {
  background: var(--color-olive);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  align-self: flex-end;
  box-shadow: 0 1px 4px rgba(44, 74, 62, 0.2);
}
.chat-msg--in {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 14px 14px 14px 4px;
  align-self: flex-start;
}
.chat-msg--prayer {
  border-left: 3px solid var(--color-gold);
  background: var(--color-gold-soft);
}
.chat-msg--system {
  align-self: center;
  background: var(--color-gold-soft);
  color: var(--color-gold);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0.3rem 0.8rem;
}
.chat-compose__input:focus {
  border-color: var(--color-olive) !important;
  box-shadow: 0 0 0 3px rgba(44, 74, 62, 0.08);
}
.chat-compose__btn:hover {
  transform: scale(1.08);
}
.chat-compose__btn:active {
  transform: scale(0.95);
}
