/* ─── Notification bell & dropdown ─────────────────────────────────────────── */

.notification-bell {
  position: relative;
}

.notification-bell__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.notification-bell__button:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.notification-bell__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  position: absolute;
  top: -5px;
  right: -5px;
}

.notification-bell__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  z-index: 50;
  overflow: hidden;
}

.notification-bell__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-sm);
}

.notification-bell__mark-all {
  background: none;
  border: none;
  color: var(--brand-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}

.notification-bell__mark-all:hover {
  text-decoration: underline;
}

.notification-bell__list {
  max-height: 360px;
  overflow-y: auto;
}

.notification-bell__item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.notification-bell__item--unread {
  background: var(--brand-primary-lt);
}

.notification-bell__item-main {
  display: block;
  color: var(--color-text);
  text-decoration: none;
}

.notification-bell__item-main strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
}

.notification-bell__item-main span {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.notification-bell__item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.notification-bell__item-meta time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.notification-bell__mark-one {
  background: none;
  border: none;
  color: var(--brand-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.notification-bell__mark-one:hover {
  text-decoration: underline;
}

.notification-bell__empty {
  padding: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
}

[x-cloak] {
  display: none !important;
}

.announcement-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-4) var(--space-6) 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.announcement-banner p {
  margin: var(--space-1) 0 var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.announcement-banner--important { border-left-color: #d97706; }
.announcement-banner--critical { border-left-color: #dc2626; }

.announcement-dismiss {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.announcement-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.announcement-modal__card {
  position: relative;
  width: min(520px, 100%);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
}

.announcement-modal__card h2 { margin: var(--space-3) 0 var(--space-2); }
.announcement-modal__card p { color: var(--color-text-muted); white-space: pre-line; }
.announcement-modal__card form { display: inline-block; margin: var(--space-4) var(--space-2) 0 0; }

@media (max-width: 640px) {
  .announcement-banner { margin-left: var(--space-3); margin-right: var(--space-3); }
}
