.treadic-message-bell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 0;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.65);
  color: rgba(248, 250, 252, 0.95);
  cursor: pointer;
  font-size: 0.72rem;
  vertical-align: middle;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.treadic-message-bell:hover,
.treadic-message-bell:focus-visible {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(148, 163, 184, 0.45);
}

.treadic-message-bell-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  font-weight: 700;
  font-size: 12px;
}

.treadic-nav-messages {
  margin-left: 16px;
  color: #fbbf24;
  font-weight: 600;
  white-space: nowrap;
}

#header #nav-global {
  padding: 0.35rem 0 0.15rem;
}

@media (max-width: 767px) {
  #header #site-name,
  #header .treadic-admin-brand {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
  }

  .treadic-message-bell {
    padding: 0.12rem 0.38rem;
    font-size: 10px;
    flex-shrink: 0;
  }

  #header #nav-global {
    display: none;
  }
}

.treadic-message-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
}

.treadic-message-overlay.is-open {
  display: flex;
}

.treadic-message-modal {
  width: min(640px, 100%);
  max-height: min(80vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.treadic-message-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #0d4f6d 0%, #0f766e 100%);
  color: #fff;
}

.treadic-message-header h2 {
  margin: 0;
  font-size: 20px;
}

.treadic-message-subtitle {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.treadic-message-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.treadic-message-list {
  overflow-y: auto;
  padding: 16px 22px;
}

.treadic-message-card {
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}

.treadic-message-card:last-child {
  border-bottom: 0;
}

.treadic-message-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  color: #475569;
  font-size: 13px;
}

.treadic-message-meta strong {
  color: #0f172a;
  font-size: 15px;
}

.treadic-message-body {
  margin: 0 0 12px;
  white-space: pre-wrap;
  color: #111827;
}

.treadic-message-actions,
.treadic-message-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.treadic-message-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

.treadic-message-empty {
  margin: 0;
  color: #64748b;
}