.activity-reminder-center {
  position: relative;
  z-index: 60;
}

.activity-reminder-toggle {
  position: relative;
  color: #475569;
}

.activity-reminder-toggle:hover,
.activity-reminder-toggle.is-open {
  color: #6366f1;
  background: #eef2ff;
  border-color: #c7d2fe;
}

.activity-reminder-toggle.has-urgent::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(239, 68, 68, 0.32);
  border-radius: inherit;
  animation: activity-reminder-pulse 2s ease-out infinite;
  pointer-events: none;
}

.activity-reminder-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.4rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.625rem;
  line-height: 1;
  font-weight: 800;
}

.activity-reminder-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: min(27rem, calc(100vw - 1rem));
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.45);
  color: #0f172a;
  z-index: 1150;
}

.activity-reminder-panel.hidden {
  display: none !important;
}

.activity-reminder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.activity-reminder-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.activity-reminder-header p {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.activity-reminder-urgent {
  flex-shrink: 0;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.68rem;
  font-weight: 800;
}

.activity-reminder-list {
  max-height: min(31rem, calc(100vh - 7rem));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.activity-reminder-item {
  --reminder-color: #a5b4fc;
  --reminder-bg: #eef2ff;
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-left: 4px solid var(--reminder-color);
  border-bottom: 1px solid #f1f5f9;
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.activity-reminder-item:hover {
  background: var(--reminder-bg);
  transform: translateX(2px);
}

.activity-reminder-item.is-success { --reminder-color: #10b981; --reminder-bg: #ecfdf5; }
.activity-reminder-item.is-warning { --reminder-color: #f59e0b; --reminder-bg: #fffbeb; }
.activity-reminder-item.is-danger { --reminder-color: #ef4444; --reminder-bg: #fef2f2; }
.activity-reminder-item.is-progress { --reminder-color: #6366f1; --reminder-bg: #eef2ff; }

.activity-reminder-icon {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--reminder-bg);
  color: var(--reminder-color);
  font-size: 0.85rem;
}

.activity-reminder-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.activity-reminder-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
}

.activity-reminder-status {
  flex-shrink: 0;
  color: var(--reminder-color);
}

.activity-reminder-body strong {
  overflow: hidden;
  color: #1e293b;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-reminder-time {
  color: #64748b;
  font-size: 0.67rem;
  font-weight: 600;
}

.activity-reminder-time i {
  margin-inline-end: 0.2rem;
  color: var(--reminder-color);
}

.activity-reminder-arrow {
  color: #cbd5e1;
  font-size: 0.65rem;
}

.activity-reminder-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 2.5rem 1rem;
  text-align: center;
}

.activity-reminder-empty > span {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
}

.activity-reminder-empty strong {
  color: #1e293b;
  font-size: 0.85rem;
}

.activity-reminder-empty p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
}

.activity-reminder-highlight {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 3px;
  animation: activity-reminder-highlight 1.1s ease-in-out 3;
}

[dir="rtl"] .activity-reminder-panel {
  right: auto;
  left: 0;
}

[dir="rtl"] .activity-reminder-item {
  border-right: 4px solid var(--reminder-color);
  border-left: 0;
}

[dir="rtl"] .activity-reminder-item:hover {
  transform: translateX(-2px);
}

[dir="rtl"] .activity-reminder-arrow {
  transform: rotate(180deg);
}

@keyframes activity-reminder-pulse {
  0% { opacity: 0.8; transform: scale(0.92); }
  70%, 100% { opacity: 0; transform: scale(1.35); }
}

@keyframes activity-reminder-highlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
  50% { box-shadow: 0 0 0 7px rgba(79, 70, 229, 0.14); }
}

@media (max-width: 480px) {
  .activity-reminder-panel {
    position: fixed;
    top: 3.8rem;
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
  }

  [dir="rtl"] .activity-reminder-panel {
    right: 0.5rem;
    left: 0.5rem;
  }

  .activity-reminder-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-reminder-toggle.has-urgent::after {
    animation: none;
  }

  .activity-reminder-highlight {
    animation: none;
  }
}
