/* source: notification-dropdown.css */
/**
 * Notification Dropdown Styles
 * World-class dropdown component for notification bell icon
 */

/* ============================================================================
   DROPDOWN CONTAINER
   ============================================================================ */

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 400px;
  max-width: calc(100vw - 32px);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  animation: slideDown var(--transition-fast);
  overflow: hidden;
}

@media (max-width: 640px) {
  .notification-dropdown {
    position: fixed;
    top: 64px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }
}

/* ============================================================================
   HEADER
   ============================================================================ */

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4);
  border-bottom: 1px solid var(--color-border-default);
  background-color: var(--color-bg-primary);
}

.notification-dropdown-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.notification-mark-all-btn {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary-600);
  background: transparent;
  border: none;
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-default);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notification-mark-all-btn:hover {
  background-color: var(--color-primary-50);
  color: var(--color-primary-700);
}

.notification-mark-all-btn:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* ============================================================================
   NOTIFICATIONS LIST
   ============================================================================ */

.notification-dropdown-list {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar styling */
.notification-dropdown-list::-webkit-scrollbar {
  width: 8px;
}

.notification-dropdown-list::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

.notification-dropdown-list::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: 4px;
}

.notification-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

/* ============================================================================
   NOTIFICATION ITEMS
   ============================================================================ */

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-3);
  padding: var(--spacing-4);
  border-bottom: 1px solid var(--color-border-subtle);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  position: relative;
  background-color: var(--color-bg-primary);
}

.notification-item:hover {
  background-color: var(--color-gray-50);
}

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

.notification-item:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: -2px;
}

/* Unread notification styling */
.notification-item-unread {
  background-color: var(--color-primary-50);
}

.notification-item-unread:hover {
  background-color: var(--color-primary-100);
}

/* Announcement notifications - prominent styling */
.notification-item-announcement {
  background: linear-gradient(to right, #fff7ed 0%, #ffffff 100%);
  border-left: 4px solid #f59e0b;
}

.notification-item-announcement:hover {
  background: linear-gradient(to right, #ffedd5 0%, #fef3c7 100%);
}

.notification-item-announcement .notification-icon {
  background-color: #fef3c7;
  color: #f59e0b;
}

.notification-item-announcement .notification-title {
  font-weight: 600;
  color: #92400e;
}

/* ============================================================================
   NOTIFICATION ICON
   ============================================================================ */

.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-gray-100);
  border-radius: var(--radius-full);
  color: var(--color-gray-600);
}

.notification-item-unread .notification-icon {
  background-color: var(--color-primary-100);
  color: var(--color-primary-600);
}

.notification-icon svg {
  width: 20px;
  height: 20px;
}

/* ============================================================================
   NOTIFICATION CONTENT
   ============================================================================ */

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-2);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

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

/* ============================================================================
   UNREAD INDICATOR (BLUE DOT)
   ============================================================================ */

.notification-unread-indicator {
  position: absolute;
  top: 18px;
  right: var(--spacing-4);
  width: 8px;
  height: 8px;
  background-color: var(--color-primary-600);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-primary-50);
}

/* ============================================================================
   EMPTY / LOADING / ERROR STATES
   ============================================================================ */

.notification-empty,
.notification-loading,
.notification-error {
  padding: var(--spacing-8) var(--spacing-4);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.notification-loading {
  color: var(--color-primary-600);
}

.notification-error {
  color: var(--color-error-600);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.notification-dropdown-footer {
  padding: var(--spacing-3) var(--spacing-4);
  border-top: 1px solid var(--color-border-default);
  background-color: var(--color-bg-secondary);
  text-align: center;
}

.notification-view-all-link {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary-600);
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-default);
  transition: all var(--transition-fast);
}

.notification-view-all-link:hover {
  background-color: var(--color-primary-50);
  color: var(--color-primary-700);
}

.notification-view-all-link:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   DARK MODE SUPPORT (OPTIONAL)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  .notification-dropdown {
    background-color: var(--color-gray-800);
    border-color: var(--color-gray-700);
  }

  .notification-dropdown-header {
    background-color: var(--color-gray-800);
    border-bottom-color: var(--color-gray-700);
  }

  .notification-item {
    background-color: var(--color-gray-800);
  }

  .notification-item:hover {
    background-color: var(--color-gray-700);
  }

  .notification-item-unread {
    background-color: rgba(37, 99, 235, 0.1);
  }

  .notification-item-unread:hover {
    background-color: rgba(37, 99, 235, 0.15);
  }

  .notification-icon {
    background-color: var(--color-gray-700);
    color: var(--color-gray-400);
  }

  .notification-item-unread .notification-icon {
    background-color: rgba(37, 99, 235, 0.2);
    color: var(--color-primary-400);
  }

  .notification-dropdown-footer {
    background-color: var(--color-gray-700);
    border-top-color: var(--color-gray-600);
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* High contrast mode support */
@media (prefers-contrast: high) {
  .notification-dropdown {
    border-width: 2px;
  }

  .notification-item {
    border-bottom-width: 2px;
  }

  .notification-unread-indicator {
    border-width: 3px;
  }
}

/* ============================================================================
   MODERATION ACTIONS (inline approve/remove buttons)
   ============================================================================ */

.notification-moderation-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--color-border-default);
}

.moderation-action-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-default);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.moderation-approve-btn {
  background-color: var(--color-success-subtle, #dcfce7);
  color: var(--color-success-emphasis, #166534);
  border-color: var(--color-success-muted, #86efac);
}

.moderation-approve-btn:hover:not(:disabled) {
  background-color: var(--color-success-muted, #86efac);
}

.moderation-remove-btn {
  background-color: var(--color-danger-subtle, #fef2f2);
  color: var(--color-danger-emphasis, #991b1b);
  border-color: var(--color-danger-muted, #fca5a5);
}

.moderation-remove-btn:hover:not(:disabled) {
  background-color: var(--color-danger-muted, #fca5a5);
}

.moderation-action-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.moderation-action-done {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-success-emphasis, #166534);
  padding: 4px 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .notification-dropdown {
    animation: none;
  }

  .notification-item {
    transition: none;
  }
}

/* source: navigation-modal.css */
/**
 * Navigation Modal CSS - Community Platform
 * Teal/cyan branding with modern card-based navigation
 */

/* Modal overlay and backdrop */
.navigation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Modal container */
.navigation-modal {
    background: var(--bg-card, #ffffff);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal header */
.navigation-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle, #f0f0f0);
    background: linear-gradient(135deg, #14b8a6 0%, #0891b2 100%);
}

.navigation-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navigation-modal-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.navigation-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.navigation-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal body */
.navigation-modal-body {
    overflow-y: auto;
    max-height: calc(90vh - 120px);
    padding: 0;
}

.nav-modal-container {
    padding: 1.5rem;
}

/* Category sections */
.nav-category-section {
    margin-bottom: 2rem;
}

.nav-category-section:last-child {
    margin-bottom: 0;
}

.nav-category-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary, #64748b);
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
    letter-spacing: 0.05em;
}

/* Grid layout */
.nav-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Navigation tiles */
.nav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card, #ffffff);
    border: 2px solid var(--border-subtle, #f0f0f0);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #14b8a6, #06b6d4);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.15);
    border-color: var(--primary, #14b8a6);
}

.nav-tile:hover::before {
    transform: scaleX(1);
}

.nav-tile:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.1);
}

/* Icon */
.nav-tile-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s ease;
}

.nav-tile:hover .nav-tile-icon {
    transform: scale(1.1);
}

/* Text */
.nav-tile-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 0.25rem;
    text-align: center;
}

.nav-tile-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
    text-align: center;
    line-height: 1.3;
}

/* Badge */
.nav-tile-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(20, 184, 166, 0.3);
}

/* Admin tiles */
.nav-tile.admin {
    background: linear-gradient(135deg, #424242 0%, #212121 100%);
    border: none;
    color: white;
}

.nav-tile.admin::before {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.nav-tile.admin .nav-tile-title {
    color: white;
}

.nav-tile.admin .nav-tile-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.nav-tile.admin:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
.nav-modal-footer {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-subtle, #f0f0f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-modal-recent {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
}

.nav-modal-recent a {
    color: var(--primary, #14b8a6);
    text-decoration: none;
    margin-left: 0.5rem;
    transition: color 0.2s;
}

.nav-modal-recent a:hover {
    text-decoration: underline;
    color: var(--primary-dark, #0891b2);
}

/* Keyboard focus indicators */
.nav-tile:focus {
    outline: 3px solid var(--primary, #14b8a6);
    outline-offset: 2px;
}

.nav-tile:focus:not(:focus-visible) {
    outline: none;
}

.nav-tile:focus-visible {
    outline: 3px solid var(--primary, #14b8a6);
    outline-offset: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .navigation-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .nav-modal-container {
        padding: 1rem;
    }

    .nav-modal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .nav-tile {
        padding: 1rem 0.75rem;
    }

    .nav-tile-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .nav-tile-title {
        font-size: 0.9rem;
    }

    .nav-tile-subtitle {
        font-size: 0.7rem;
    }

    .nav-modal-footer {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-modal-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .nav-tile {
        padding: 1rem;
    }

    .navigation-modal-header {
        padding: 1rem;
    }
}

/* Dark theme support */
[data-theme="dark"] .navigation-modal,
.theme-dark .navigation-modal {
    background: var(--bg-card, #1e293b);
}

[data-theme="dark"] .navigation-modal-header,
.theme-dark .navigation-modal-header {
    border-bottom-color: var(--border-subtle, #334155);
}

[data-theme="dark"] .nav-tile,
.theme-dark .nav-tile {
    background: var(--bg-card, #1e293b);
    border-color: var(--border-subtle, #334155);
}

[data-theme="dark"] .nav-tile:hover,
.theme-dark .nav-tile:hover {
    border-color: var(--primary, #14b8a6);
    background: var(--bg-hover, #334155);
}

[data-theme="dark"] .nav-tile-title,
.theme-dark .nav-tile-title {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .nav-tile-subtitle,
.theme-dark .nav-tile-subtitle {
    color: var(--text-secondary, #94a3b8);
}

[data-theme="dark"] .nav-category-title,
.theme-dark .nav-category-title {
    color: var(--text-secondary, #94a3b8);
}

[data-theme="dark"] .nav-modal-footer,
.theme-dark .nav-modal-footer {
    border-top-color: var(--border-subtle, #334155);
}

[data-theme="dark"] .nav-modal-recent,
.theme-dark .nav-modal-recent {
    color: var(--text-secondary, #94a3b8);
}

/* Smooth scrolling */
.navigation-modal-body {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.navigation-modal-body::-webkit-scrollbar {
    width: 8px;
}

.navigation-modal-body::-webkit-scrollbar-track {
    background: var(--bg-secondary, #f8fafc);
    border-radius: 4px;
}

.navigation-modal-body::-webkit-scrollbar-thumb {
    background: var(--primary, #14b8a6);
    border-radius: 4px;
}

.navigation-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark, #0891b2);
}

[data-theme="dark"] .navigation-modal-body::-webkit-scrollbar-track,
.theme-dark .navigation-modal-body::-webkit-scrollbar-track {
    background: var(--bg-secondary, #0f172a);
}

/* Animation states */
.navigation-modal.closing {
    animation: modalSlideDown 0.3s ease-out forwards;
}

@keyframes modalSlideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Active page indicator */
.nav-tile[style*="border-color: var(--primary)"] {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
}

[data-theme="dark"] .nav-tile[style*="border-color: var(--primary)"],
.theme-dark .nav-tile[style*="border-color: var(--primary)"] {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
}

/* Touch-friendly sizing */
@media (hover: none) and (pointer: coarse) {
    .nav-tile {
        min-height: 120px;
    }

    .navigation-modal-close {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .navigation-modal {
        max-height: 100vh;
    }

    .navigation-modal-body {
        max-height: calc(100vh - 80px);
    }

    .nav-modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-tile {
        border-width: 3px;
    }

    .nav-tile:hover {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .navigation-modal,
    .nav-tile,
    .nav-tile-icon,
    .navigation-modal-close {
        animation: none !important;
        transition: none !important;
    }
}

/* source: footer.css */
/**
 * Footer Component Styles - MySovereignty Community Platform
 * Version: 1.0.0
 *
 * Professional footer styling with dark teal background, four-column responsive grid,
 * and cyan hover effects. Uses design-system CSS variables for consistency.
 *
 * Features:
 * - Dark teal background (#0a5f5a / darker teal)
 * - Four-column grid (collapses to 1 column on mobile)
 * - Cyan link hover effects (#14b8a6)
 * - Contact modal styling (clean, professional)
 * - Fully responsive design
 */

/* ============================================================================
   FOOTER CONTAINER
   ============================================================================ */

footer[role="contentinfo"] {
  background-color: #0a5f5a; /* Dark teal - darker than --color-accent-700 */
  color: var(--color-gray-300, #d1d5db);
  margin-top: 2rem;
  box-shadow: var(--shadow-lg);
}

footer[role="contentinfo"] .footer-container {
  max-width: var(--container-xl, 1280px);
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

@media (min-width: 640px) {
  footer[role="contentinfo"] .footer-container {
    padding: 2rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  footer[role="contentinfo"] .footer-container {
    padding: 2rem 2rem;
  }
}

/* ============================================================================
   FOOTER GRID - Four-column responsive layout
   ============================================================================ */

.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ============================================================================
   FOOTER TYPOGRAPHY
   ============================================================================ */

footer[role="contentinfo"] h3 {
  color: #ffffff;
  font-weight: var(--font-weight-semibold, 600);
  font-size: var(--text-sm, 0.875rem);
  margin-bottom: 0.75rem;
  letter-spacing: 0.025em;
}

footer[role="contentinfo"] p {
  font-size: var(--text-sm, 0.875rem);
  line-height: var(--leading-relaxed, 1.625);
  color: var(--color-gray-400, #9ca3af);
  margin: 0;
}

footer[role="contentinfo"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer[role="contentinfo"] li {
  margin-bottom: 0.375rem;
}

/* ============================================================================
   FOOTER LINKS - Cyan hover effects
   ============================================================================ */

footer[role="contentinfo"] a,
footer[role="contentinfo"] button.footer-link {
  color: var(--color-gray-300, #d1d5db);
  text-decoration: none;
  font-size: var(--text-sm, 0.875rem);
  transition: color var(--transition-fast, 150ms ease-in-out);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

footer[role="contentinfo"] a:hover,
footer[role="contentinfo"] button.footer-link:hover {
  color: #14b8a6; /* Cyan - --color-accent-500 */
}

footer[role="contentinfo"] a:focus-visible,
footer[role="contentinfo"] button.footer-link:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
  border-radius: var(--radius-sm, 0.25rem);
}

/* ============================================================================
   FOOTER DIVIDER
   ============================================================================ */

.footer-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0;
  padding-top: 1rem;
}

/* ============================================================================
   FOOTER BOTTOM ROW - Copyright & Tagline
   ============================================================================ */

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-gray-400, #9ca3af);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  margin: 0;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom p {
    text-align: left;
  }
}

/* ============================================================================
   CONTACT MODAL
   ============================================================================ */

#contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop, 1400);
  animation: fadeIn var(--transition-base, 200ms ease-in-out);
}

#contact-modal.modal-open {
  display: flex;
}

.contact-modal-content {
  background-color: var(--color-white, #ffffff);
  border-radius: var(--radius-lg, 0.75rem);
  box-shadow: var(--shadow-xl);
  max-width: 32rem;
  width: 100%;
  margin: 1rem;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp var(--transition-base, 200ms ease-in-out);
}

.contact-modal-content .modal-padding {
  padding: 1.5rem;
}

/* Modal Header */
.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.contact-modal-header h2 {
  font-size: var(--text-2xl, 1.5rem);
  font-weight: var(--font-weight-bold, 700);
  color: var(--color-gray-900, #111827);
  margin: 0;
}

.contact-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gray-400, #9ca3af);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.5rem;
  border-radius: var(--radius-default, 0.375rem);
  transition: all var(--transition-fast, 150ms ease-in-out);
}

.contact-modal-close:hover {
  background-color: var(--color-gray-100, #f3f4f6);
  color: var(--color-gray-600, #4b5563);
}

/* Modal Description */
.contact-modal-description {
  color: var(--color-gray-600, #4b5563);
  font-size: var(--text-base, 1rem);
  margin-bottom: 1.5rem;
  line-height: var(--leading-normal, 1.5);
}

/* Modal Form */
.contact-form-group {
  margin-bottom: 1rem;
}

.contact-form-label {
  display: block;
  font-size: var(--text-sm, 0.875rem);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-gray-700, #374151);
  margin-bottom: 0.25rem;
}

.contact-form-input,
.contact-form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: var(--text-base, 1rem);
  line-height: var(--leading-normal, 1.5);
  color: var(--color-gray-900, #111827);
  background-color: var(--color-white, #ffffff);
  border: 1px solid var(--color-gray-300, #d1d5db);
  border-radius: var(--radius-md, 0.5rem);
  transition: all var(--transition-fast, 150ms ease-in-out);
  font-family: inherit;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
  outline: none;
  border-color: var(--color-primary-500, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.contact-form-textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form-helper {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-gray-500, #6b7280);
  margin-top: 0.25rem;
}

/* Success & Error Messages */
.contact-success,
.contact-error {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md, 0.5rem);
  margin-bottom: 1rem;
  font-size: var(--text-sm, 0.875rem);
  display: none; /* Hidden by default */
}

.contact-success {
  background-color: var(--color-success-50, #f0fdf4);
  border: 1px solid var(--color-success-200, #bbf7d0);
  color: var(--color-success-700, #15803d);
}

.contact-error {
  background-color: var(--color-error-50, #fef2f2);
  border: 1px solid var(--color-error-200, #fecaca);
  color: var(--color-error-700, #b91c1c);
}

.contact-success.show,
.contact-error.show {
  display: block;
}

/* Modal Actions */
.contact-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--color-gray-200, #e5e7eb);
}

.contact-btn-cancel {
  padding: 0.5rem 1rem;
  font-size: var(--text-base, 1rem);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-gray-700, #374151);
  background-color: transparent;
  border: 1px solid var(--color-gray-300, #d1d5db);
  border-radius: var(--radius-md, 0.5rem);
  cursor: pointer;
  transition: all var(--transition-fast, 150ms ease-in-out);
}

.contact-btn-cancel:hover {
  background-color: var(--color-gray-50, #f9fafb);
}

.contact-btn-submit {
  padding: 0.5rem 1rem;
  font-size: var(--text-base, 1rem);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-white, #ffffff);
  background-color: var(--color-primary-600, #2563eb);
  border: none;
  border-radius: var(--radius-md, 0.5rem);
  cursor: pointer;
  transition: all var(--transition-fast, 150ms ease-in-out);
}

.contact-btn-submit:hover:not(:disabled) {
  background-color: var(--color-primary-700, #1d4ed8);
}

.contact-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  footer[role="contentinfo"] *,
  #contact-modal *,
  footer[role="contentinfo"] *::before,
  footer[role="contentinfo"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   SOVEREIGNTY STATUS BAR — authenticated minimal footer
   Two tiers: assertion line (italic) + three-cluster chrome row
   ============================================================================ */

footer.footer--sovereignty {
  background-color: var(--bg-surface, #f5f5f5);
  color: var(--text-secondary, #4a4a4a);
  box-shadow: none;
  border-top: 1px solid #cccccc;
}

/* Replaces inline `color:#4a4a4a` previously on Footer.js-rendered links/
 * buttons. Keeps cascade clean so [data-theme="dark"] block can flip. */
footer.footer--sovereignty .footer-sovereignty-assertion,
footer.footer--sovereignty .footer-sovereignty-bar,
footer.footer--sovereignty .footer-te-tiriti,
footer.footer--sovereignty .footer-cluster a,
footer.footer--sovereignty .footer-cluster .footer-contact-btn,
footer.footer--sovereignty .footer-cluster .footer-qr-btn {
  color: #4a4a4a;
}

footer.footer--sovereignty .footer-cluster-separator {
  color: #cccccc;
}

footer.footer--sovereignty .footer-back-to-home a {
  color: #0f766e;                          /* teal-700 light brand */
}

footer.footer--sovereignty .footer-identity {
  color: #6b6b6b;
  border-top: 1px solid #e5e5e5;
}

.footer-sovereignty-assertion {
  text-align: center;
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.4;
}

.footer-sovereignty-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  font-size: 0.875rem;
}

.footer-cluster {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
}

/*
 * NOTE: styles.css has `footer[role="contentinfo"] a:hover { color: #fff !important; }`
 * which is appropriate for the OLD dark-teal footer (white-on-teal contrast) but
 * makes <a> tags invisible on the new light-grey sovereignty footer. We override
 * with the same !important specificity, scoped to footer.footer--sovereignty.
 */
footer.footer--sovereignty[role="contentinfo"] .footer-cluster a:hover,
footer.footer--sovereignty[role="contentinfo"] .footer-cluster .footer-contact-btn:hover,
footer.footer--sovereignty[role="contentinfo"] .footer-cluster .footer-qr-btn:hover {
  color: #14b8a6 !important;
}
.footer-cluster a:hover,
.footer-cluster .footer-contact-btn:hover,
.footer-cluster .footer-qr-btn:hover {
  color: #14b8a6;
}

.footer-te-tiriti {
  max-width: 820px;
  margin: 0 auto 0.85rem;
  padding: 0 1rem;
  text-align: center;
  font-style: italic;
  font-size: 0.825rem;
  line-height: 1.55;
  color: #4a4a4a;
}

.footer-identity {
  text-align: center;
  font-size: 0.8rem;
  color: #6b6b6b;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e5e5;
}

.footer-identity a:hover {
  color: #14b8a6;
}

/* ============================================================================
   WB-B1 MEDIUM-3.2 — WCAG 44×44 touch targets on footer interactive elements.
   Covers BOTH minimal sovereignty footer (.footer-sovereignty-bar) AND full
   marketing footer (.footer-column). Pre-fix audit 2026-05-12:
   .footer-contact-btn + .footer-qr-btn rendered ~139×18 (text bounding box only).
   ============================================================================ */
@media (max-width: 768px), (hover: none) {
  footer[role="contentinfo"] .footer-contact-btn,
  footer[role="contentinfo"] .footer-qr-btn,
  footer[role="contentinfo"] .footer-cluster a,
  footer[role="contentinfo"] .footer-column a {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.4rem 0.5rem !important;
  }
}

/* ============================================================================
   WB-B8 — Footer collapse on landscape phones.
   Audit 2026-05-12: full footer rendered 733-937px tall; on a 320-390px-tall
   landscape phone viewport that's 188-293% of viewport height. User scrolls
   past 700-900px of chrome to reach content. Hide the 4-column grid + Te
   Tiriti acknowledgement + ecosystem strap; keep copyright + flags only.
   ============================================================================ */
@media (max-height: 500px) and (orientation: landscape) {
  footer[role="contentinfo"] .footer-grid {
    display: none !important;
  }
  footer[role="contentinfo"] .footer-bottom {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  footer[role="contentinfo"] .footer-ecosystem {
    display: none !important;
  }
  footer[role="contentinfo"] .footer-bottom-left p[data-i18n="footer.teTiriti"] {
    display: none !important;
  }
  footer[role="contentinfo"] .footer-bottom-right {
    gap: 0.5rem !important;
  }
}

.footer-cluster-separator--strong {
  font-weight: 300;
  opacity: 0.6;
}

/* Tablet — cluster row stays inline, separator shrinks margin */
@media (max-width: 768px) {
  .footer-sovereignty-bar {
    flex-direction: column;
    gap: 0.5rem;
  }
  .footer-cluster-separator--strong {
    display: none;
  }
  .footer-cluster {
    justify-content: center;
  }
}

/* Phone — tighter spacing inside clusters */
@media (max-width: 480px) {
  .footer-sovereignty-assertion {
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }
  .footer-sovereignty-bar {
    font-size: 0.825rem;
  }
  .footer-cluster {
    gap: 0.3rem 0.6rem;
  }
}

/* ============================================================================
   DARK MODE OVERRIDES — sovereignty footer + identity strip
   Phase 4 dark theme (session #41) added [data-theme="dark"] coverage to
   design-system.css + welcome.css token namespaces, but footer.css was missed.
   Symptom: footer rendered light-grey (#f5f5f5) on slate-900 page bg in dark
   mode. These rules use the same slate-800 surface as nav for visual continuity.
   ============================================================================ */
[data-theme="dark"] footer.footer--sovereignty {
  background-color: #1e293b;             /* slate-800 — matches dark nav */
  color: #cbd5e1;                        /* slate-300 — secondary text */
  border-top: 1px solid #334155;         /* slate-700 — subtle separator */
}

[data-theme="dark"] footer.footer--sovereignty .footer-sovereignty-assertion,
[data-theme="dark"] footer.footer--sovereignty .footer-sovereignty-bar {
  color: #cbd5e1;                        /* slate-300 */
}

[data-theme="dark"] footer.footer--sovereignty .footer-cluster a,
[data-theme="dark"] footer.footer--sovereignty .footer-cluster .footer-contact-btn,
[data-theme="dark"] footer.footer--sovereignty .footer-cluster .footer-qr-btn {
  color: #94a3b8;                        /* slate-400 */
}

[data-theme="dark"] footer.footer--sovereignty .footer-cluster-separator {
  color: #475569;                        /* slate-600 — subtle on dark */
}

[data-theme="dark"] footer.footer--sovereignty .footer-back-to-home a {
  color: #5eead4;                        /* teal-300 — brighter for dark bg AA */
}

[data-theme="dark"] .footer-cluster a:hover,
[data-theme="dark"] .footer-cluster .footer-contact-btn:hover,
[data-theme="dark"] .footer-cluster .footer-qr-btn:hover {
  color: #2dd4bf !important;             /* teal-400 — overrides light-mode #14b8a6 + styles.css !important */
}

[data-theme="dark"] footer.footer--sovereignty .footer-te-tiriti {
  color: #cbd5e1;                        /* slate-300 — bumped from slate-400 for AA on slate-800 (axe-flagged Phase G); re-scoped to win over footer.footer--sovereignty light-mode rule (specificity bug fixed Phase G iter-2) */
}

[data-theme="dark"] footer.footer--sovereignty .footer-identity {
  color: #cbd5e1;                        /* slate-300 — bumped from slate-500 (insufficient AA contrast on slate-800 bg; axe-flagged on 7 member-surface pages, Tier-3 audit session #43). Cascade-scoped to footer.footer--sovereignty so the dark rule (specificity 32) wins over light rule at line 433 (specificity 21) — same fix pattern as Phase G iter-2 te-tiriti. */
  border-top-color: #334155;             /* slate-700 */
}

[data-theme="dark"] .footer-identity a:hover {
  color: #2dd4bf;                        /* teal-400 */
}

/* source: feedback.min.css */
#feedback-fab{
  bottom:1.5rem !important;
  position:fixed !important;
  right:1.5rem !important;
  transition:all .2s cubic-bezier(.4, 0, .2, 1);
  z-index:1000 !important;
}

#feedback-fab:hover{
  transform:scale(1.1);
}

#feedback-fab:active{
  transform:scale(.95);
}
@media (max-width:768px){
  #feedback-fab{
    bottom:1rem !important;
    right:1rem !important;
  }
}

#feedback-modal{
  z-index:1001 !important;
}

#feedback-backdrop{
  transition:opacity .3s ease-out;
}

#feedback-panel{
  transition:transform .3s cubic-bezier(.4, 0, .2, 1);
}
@media (max-width:768px){
  #feedback-panel{
    border-radius:1rem 1rem 0 0;
  }
}

.feedback-type-btn{
  cursor:pointer;
  transition:all .2s cubic-bezier(.4, 0, .2, 1);
}

.feedback-type-btn:hover{
  box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
  transform:translateY(-2px);
}

.feedback-type-btn:active{
  transform:translateY(0);
}

#feedback-form input,#feedback-form textarea{
  transition:all .2s ease-in-out;
}

#feedback-form input:focus,#feedback-form textarea:focus{
  box-shadow:0 0 0 3px rgba(20,184,166,.1);
  outline:none;
}
@keyframes fadeIn{
  0%{
    opacity:0;
  }
  to{
    opacity:1;
  }
}
@keyframes slideUp{
  0%{
    transform:translateY(100%);
  }
  to{
    transform:translateY(0);
  }
}
@keyframes scaleIn{
  0%{
    opacity:0;
    transform:scale(.9);
  }
  to{
    opacity:1;
    transform:scale(1);
  }
}
#feedback-modal:not(.hidden) #feedback-backdrop{
  animation:fadeIn .3s ease-out;
}

#feedback-modal:not(.hidden) #feedback-panel{
  animation:slideUp .3s cubic-bezier(.4, 0, .2, 1);
}

@media (min-width:769px){
  #feedback-modal:not(.hidden) #feedback-panel{
    animation:scaleIn .3s cubic-bezier(.4, 0, .2, 1);
  }
}
#feedback-fab:focus,#feedback-form button:focus,#feedback-form input:focus,#feedback-form textarea:focus,.feedback-type-btn:focus{
  outline:2px solid var(--color-accent-500, #14b8a6);
  outline-offset:2px;
}
@media (prefers-reduced-motion:reduce){
  #feedback-backdrop,#feedback-fab,#feedback-form input,#feedback-form textarea,#feedback-panel,.feedback-type-btn{
    animation:none !important;
    transition:none !important;
  }
}
@media (prefers-contrast:high){
  #feedback-fab{
    border:2px solid;
  }

  .feedback-type-btn{
    border-width:3px;
  }
}

@media print{
  #feedback-fab,#feedback-modal{
    display:none !important;
  }
}
.bg-teal-50{
  background-color:#f0fdfa;
}

.bg-teal-600{
  background-color:#0d9488;
}

.bg-cyan-600{
  background-color:#0891b2;
}

.border-teal-200{
  border-color:#99f6e4;
}

.border-teal-500{
  border-color:#14b8a6;
}

.text-teal-600{
  color:#0d9488;
}

.text-teal-700{
  color:#0f766e;
}

.text-teal-900{
  color:#134e4a;
}

.hover\:bg-teal-50:hover{
  background-color:#f0fdfa;
}

.hover\:bg-teal-700:hover{
  background-color:#0f766e;
}

.hover\:border-teal-500:hover{
  border-color:#14b8a6;
}

.focus\:ring-teal-500:focus{
  --tw-ring-color:#14b8a6;
}

.focus\:border-teal-500:focus{
  border-color:#14b8a6;
}
.bg-gradient-to-r{
  background-image:linear-gradient(to right, var(--tw-gradient-stops));
}

.from-teal-600{
  --tw-gradient-from:#0d9488;
  --tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to, rgba(13,148,136,0));
}

.to-cyan-600{
  --tw-gradient-to:#0891b2;
}

.from-teal-50{
  --tw-gradient-from:#f0fdfa;
  --tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to, rgba(240,253,250,0));
}

.to-cyan-50{
  --tw-gradient-to:#ecfeff;
}


/* source: who-is-online.css */
/* Who's Online Modal Styles */

/* Modal Overlay */
.who-is-online-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Container */
.who-is-online-modal {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.who-is-online-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.who-is-online-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Online Indicator (pulse) */
.online-indicator {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.who-is-online-close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s, color 0.2s;
}

.who-is-online-close:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.who-is-online-close svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Modal Content */
.who-is-online-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Count Section */
.who-is-online-count {
  padding: 0.75rem 1rem;
  background-color: #dbeafe;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #1e40af;
  font-size: 0.875rem;
}

.who-is-online-count strong {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0.25rem;
}

/* User List */
.who-is-online-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* User Item */
.who-is-online-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  transition: background-color 0.2s;
}

.who-is-online-user:hover {
  background-color: #f3f4f6;
}

/* Avatar */
.user-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.user-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.online-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0.875rem;
  height: 0.875rem;
  background-color: #10b981;
  border: 2px solid white;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* User Info */
.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.user-role.owner {
  background-color: #f3e8ff;
  color: #6b21a8;
}

.user-role.moderator {
  background-color: #dbeafe;
  color: #1e40af;
}

.user-role.member {
  background-color: #f3f4f6;
  color: #374151;
}

.user-bio {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* User Actions */
.user-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background-color: white;
  border: 1px solid #d1d5db;
  color: #6b7280;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn-icon:hover {
  background-color: #f9fafb;
  color: #3b82f6;
  border-color: #3b82f6;
}

.btn-icon.btn-call {
  color: #0f766e;
  border-color: #99f6e4;
  background-color: #ccfbf1;
}

.btn-icon.btn-call:hover {
  background-color: #5eead4;
  color: #0f766e;
  border-color: #0f766e;
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Loading State */
.who-is-online-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.who-is-online-loading p {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Error State */
.who-is-online-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
  text-align: center;
}

.error-icon {
  width: 3rem;
  height: 3rem;
  color: #ef4444;
}

.who-is-online-error p {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Empty State */
.who-is-online-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
  text-align: center;
}

.empty-icon {
  width: 4rem;
  height: 4rem;
  color: #9ca3af;
}

.who-is-online-empty p {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Footer */
.who-is-online-footer {
  padding-top: 1rem;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
}

.who-is-online-footer small {
  color: #9ca3af;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 640px) {
  .who-is-online-modal {
    max-height: 90vh;
    margin: 0.5rem;
  }

  .who-is-online-header {
    padding: 1rem;
  }

  .who-is-online-content {
    padding: 1rem;
  }

  .who-is-online-user {
    flex-wrap: wrap;
  }

  .user-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.5rem;
  }
}

/* Federated Users - Cross-village presence */
.who-is-online-section-divider {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.5rem;
  font-weight: 500;
}

.who-is-online-user.federated-user {
  border-left: 3px solid #6366f1;
  padding-left: 0.75rem;
  background-color: #f5f3ff;
}

.who-is-online-user.federated-user:hover {
  background-color: #ede9fe;
}

.online-badge.federated {
  background-color: #6366f1;
}

.federated-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e0e7ff;
  color: #4f46e5;
}

.who-is-online-user .village-badge {
  display: inline-block;
  font-size: 0.65rem;
  background: #e0e7ff;
  color: #4338ca;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.who-is-online-count .federated-count {
  color: #6366f1;
  font-size: 0.8em;
  margin-left: 0.25rem;
}

/* Utility classes */
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }

/* source: storage-quota-widget.css */
/* Storage Quota Widget Styles */

.storage-quota-widget {
  background: white;
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.storage-quota-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.storage-quota-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

/* Usage Bar */
.storage-quota-usage {
  margin-bottom: 1rem;
}

.storage-quota-bar-container {
  width: 100%;
  height: 0.75rem;
  background-color: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.storage-quota-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.storage-quota-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Status Message */
.storage-quota-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

/* Breakdown */
.storage-quota-breakdown {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.storage-quota-breakdown summary {
  font-size: 0.75rem;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.storage-quota-breakdown summary:hover {
  color: #111827;
}

.storage-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.75rem;
  color: #6b7280;
}

.storage-breakdown-item span:first-child {
  font-weight: 500;
}

.storage-breakdown-item span:last-child {
  color: #111827;
  font-family: 'Courier New', monospace;
}

/* Upgrade Button */
.storage-quota-upgrade {
  margin-top: 1rem;
}

.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  justify-content: center;
}

.btn-upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-upgrade:active {
  transform: translateY(0);
}

/* Loading States */
.storage-quota-loading,
.storage-quota-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  color: #6b7280;
  font-size: 0.875rem;
  flex-direction: column;
}

.storage-quota-error {
  color: #ef4444;
}

.storage-quota-error button {
  margin-top: 0.5rem;
}

/* Spinner Styles */
.spinner-small {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-tiny {
  width: 1rem;
  height: 1rem;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 640px) {
  .storage-quota-widget {
    padding: 1rem;
  }

  .storage-quota-header h3 {
    font-size: 0.875rem;
  }

  .storage-quota-stats {
    font-size: 0.75rem;
  }
}

/* source: preference-completion-banner.css */
/* Preference Completion Banner Styles
   Harmonised to the Village token set (village-tokens.css) — warm card, teal
   accent, theme-aware via tokens. Fallback hex values = light theme, so the
   banner stays presentable if this file is ever linked without the tokens. */

.preference-completion-banner {
  background: var(--raised, #FFFFFF);
  border: 1px solid var(--border, #E3DCD2);
  border-left: 3px solid var(--accent, #145b6e);
  border-radius: var(--r-lg, 14px);
  box-shadow: var(--e-1, 0 1px 2px rgba(60, 50, 40, .06), 0 1px 3px rgba(60, 50, 40, .08));
  margin-bottom: 1.5rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preference-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  position: relative;
  color: var(--text, #26221E);
}

/* Icon */
.preference-banner-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-soft, #e8f5f8);
  color: var(--on-accent-soft, #0f4f60);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preference-banner-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Message */
.preference-banner-message {
  flex: 1;
  min-width: 0;
}

.preference-banner-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text, #26221E);
}

.preference-banner-description {
  font-size: 0.875rem;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
  color: var(--muted, #5C554C);
}

.grace-period-text {
  display: inline-block;
  margin-left: 0.25rem;
  font-style: italic;
  color: var(--muted, #5C554C);
}

/* Progress Bar */
.preference-progress-container {
  width: 100%;
  height: 0.5rem;
  background: var(--sunken, #F1EBE2);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.preference-progress-bar {
  height: 100%;
  background: var(--accent, #145b6e);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Missing List */
.preference-missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.75rem;
}

.preference-missing-label {
  font-weight: 600;
  color: var(--muted, #5C554C);
}

.preference-missing-item {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--accent-soft, #e8f5f8);
  color: var(--on-accent-soft, #0f4f60);
  border-radius: var(--r-sm, 6px);
  font-weight: 500;
}

/* Actions */
.preference-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-complete-preferences {
  padding: 0.5rem 1.25rem;
  background: var(--accent, #145b6e);
  color: var(--on-accent, #FFFFFF);
  border: 1px solid transparent;
  border-radius: var(--r-md, 10px);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn-complete-preferences:hover {
  background: var(--accent-hover, #0f4f60);
  color: var(--on-accent, #FFFFFF);
}

.btn-complete-preferences:active {
  background: var(--accent-hover, #0f4f60);
}

.btn-dismiss-banner {
  padding: 0.5rem 1.25rem;
  background: var(--raised, #FFFFFF);
  color: var(--text, #26221E);
  border: 1px solid var(--border-strong, #C9BFB1);
  border-radius: var(--r-md, 10px);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-dismiss-banner:hover {
  background: var(--sunken, #F1EBE2);
  border-color: var(--border-strong, #C9BFB1);
}

/* Close Button */
.preference-banner-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  border-radius: var(--r-sm, 6px);
  padding: 0.375rem;
  cursor: pointer;
  color: var(--muted, #5C554C);
  transition: background-color 0.2s, color 0.2s;
}

.preference-banner-close:hover {
  background: var(--sunken, #F1EBE2);
  color: var(--text, #26221E);
}

.preference-banner-close svg {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .preference-banner-content {
    flex-wrap: wrap;
    padding: 1rem;
  }

  .preference-banner-icon {
    width: 2rem;
    height: 2rem;
  }

  .preference-banner-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .preference-banner-title {
    font-size: 1rem;
  }

  .preference-banner-description {
    font-size: 0.8125rem;
  }

  .preference-banner-actions {
    width: 100%;
    flex-direction: row;
    margin-top: 0.5rem;
  }

  .btn-complete-preferences,
  .btn-dismiss-banner {
    flex: 1;
    text-align: center;
  }

  .preference-banner-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Utility Classes */
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }

/* source: unread-stories.css */
/* Unread Stories Modal Styles */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Container */
.unread-stories-modal {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mark-all-read-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.mark-all-read-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

.mark-all-read-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.close-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  font-size: 1.5rem;
  line-height: 1;
  transition: background-color 0.2s, color 0.2s;
}

.close-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
}

/* Category Filters */
.category-filters {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-filter-btn {
  background-color: white;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.category-filter-btn:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.category-filter-btn.active {
  background-color: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

/* Content Area */
.unread-stories-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Stories List */
.unread-stories-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Story Card */
.unread-story-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.unread-story-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.story-thumbnail {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 0.375rem;
  overflow: hidden;
  background-color: #f3f4f6;
}

.story-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.story-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.4;
}

.story-meta {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.story-excerpt {
  font-size: 0.875rem;
  color: #4b5563;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-category {
  display: inline-block;
  background-color: #f3f4f6;
  color: #6b7280;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
  width: fit-content;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.pagination button {
  background-color: white;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.error-state p {
  color: #dc2626;
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
}

.error-state button {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.error-state button:hover {
  background-color: #2563eb;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
  max-width: 300px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .unread-stories-modal {
    max-width: 100%;
    max-height: 90vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    animation: slideUpMobile 0.3s ease;
  }

  @keyframes slideUpMobile {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-header h2 {
    font-size: 1.125rem;
  }

  .modal-actions {
    gap: 0.5rem;
  }

  .mark-all-read-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  .category-filters {
    padding: 1rem;
  }

  .unread-stories-content {
    padding: 1rem;
  }

  .unread-story-card {
    flex-direction: column;
  }

  .story-thumbnail {
    width: 100%;
    height: 180px;
  }
}

/* Scrollbar Styling */
.unread-stories-content::-webkit-scrollbar {
  width: 8px;
}

.unread-stories-content::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.unread-stories-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.unread-stories-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.category-filters::-webkit-scrollbar {
  height: 4px;
}

.category-filters::-webkit-scrollbar-track {
  background: transparent;
}

.category-filters::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}

/* source: catch-up.min.css */
#catch-up-modal.modal-overlay{
  align-items:center;
  backdrop-filter:blur(4px);
  background-color:rgba(0,0,0,.5);
  bottom:0;
  display:flex;
  justify-content:center;
  left:0;
  padding:1rem;
  position:fixed;
  right:0;
  top:0;
  z-index:1000;
}
#catch-up-modal .modal-content{
  animation:modalSlideIn .3s ease-out;
  background:#fff;
  border-radius:1rem;
  box-shadow:0 25px 50px -12px rgba(0,0,0,.25);
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 2rem);
  width:100%;
}

@keyframes modalSlideIn{
  0%{
    opacity:0;
    transform:translateY(-20px) scale(.95);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}
#catch-up-modal .modal-header{
  align-items:center;
  background:#f9fafb;
  border-bottom:1px solid #e5e7eb;
  border-radius:1rem 1rem 0 0;
  display:flex;
  justify-content:space-between;
  padding:1.25rem 1.5rem;
}

#catch-up-modal .modal-header h2{
  color:#111827;
  font-size:1.25rem;
  font-weight:600;
  margin:0;
}

#catch-up-modal .modal-actions{
  align-items:center;
  display:flex;
  gap:.75rem;
}

#catch-up-modal .mark-all-seen-btn{
  background-color:#3b82f6;
  border:none;
  border-radius:.5rem;
  color:#fff;
  cursor:pointer;
  font-size:.875rem;
  font-weight:500;
  padding:.5rem 1rem;
  transition:background-color .2s;
}

#catch-up-modal .mark-all-seen-btn:hover:not(:disabled){
  background-color:#2563eb;
}

#catch-up-modal .mark-all-seen-btn:disabled{
  background-color:#9ca3af;
  cursor:not-allowed;
}

#catch-up-modal .close-btn{
  background:none;
  border:none;
  border-radius:.375rem;
  color:#6b7280;
  cursor:pointer;
  font-size:1.25rem;
  line-height:1;
  padding:.5rem;
  transition:background-color .2s,color .2s;
}

#catch-up-modal .close-btn:hover{
  background-color:#f3f4f6;
  color:#111827;
}
.catch-up-modal{
  max-width:800px;
}

.catch-up-subtitle{
  color:#6b7280;
  font-size:.875rem;
  margin:.25rem 0 0;
}

.catch-up-total-count{
  color:#3b82f6;
  font-weight:600;
}
.catch-up-content{
  flex:1;
  overflow-y:auto;
  padding:1.5rem;
}
.catch-up-modules{
  display:flex;
  flex-direction:column;
  gap:1.5rem;
}
.module-section{
  background-color:#fff;
  border:1px solid #e5e7eb;
  border-radius:.5rem;
  padding:1.25rem;
  transition:box-shadow .2s;
}

.module-section:hover{
  box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
}
.module-header{
  justify-content:space-between;
  margin-bottom:.75rem;
}

.module-header,.module-title{
  align-items:center;
  display:flex;
}

.module-title{
  gap:.75rem;
}

.module-icon{
  font-size:1.5rem;
}

.module-title h3{
  color:#111827;
  font-size:1.125rem;
  font-weight:600;
  margin:0;
}

.module-count{
  font-weight:600;
}

.module-count,.view-all-link{
  color:#3b82f6;
  font-size:.875rem;
}

.view-all-link{
  font-weight:500;
  text-decoration:none;
  transition:color .2s;
  white-space:nowrap;
}

.view-all-link:hover{
  color:#2563eb;
  text-decoration:underline;
}
.module-last-checked{
  color:#6b7280;
  font-size:.8125rem;
  margin:0 0 1rem;
}
.module-preview{
  display:flex;
  flex-direction:column;
  gap:.75rem;
}
.preview-item{
  display:flex;
  gap:.75rem;
  padding-left:.5rem;
}
a.preview-item-link{
  border-radius:.375rem;
  color:inherit;
  margin:-.5rem -.5rem -.5rem 0;
  padding:.5rem;
  text-decoration:none;
  transition:background-color .15s ease;
}

a.preview-item-link:hover{
  background-color:#f3f4f6;
}

a.preview-item-link:hover .preview-bullet,a.preview-item-link:hover .preview-title{
  color:#3b82f6;
}

.preview-bullet{
  color:#9ca3af;
  flex-shrink:0;
  font-size:1.25rem;
  line-height:1.2;
}

.preview-content{
  flex:1;
  min-width:0;
}

.preview-title{
  color:#111827;
  font-size:.9375rem;
  line-height:1.4;
  margin:0 0 .25rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.preview-subtitle{
  color:#6b7280;
  font-size:.8125rem;
  margin:0;
}
.loading-state{
  align-items:center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:3rem 1rem;
  text-align:center;
}

.spinner{
  animation:spin .8s linear infinite;
  border:3px solid #e5e7eb;
  border-radius:50%;
  border-top-color:#3b82f6;
  height:3rem;
  margin-bottom:1rem;
  width:3rem;
}

@keyframes spin{
  to{
    transform:rotate(1turn);
  }
}

.loading-state p{
  color:#6b7280;
  font-size:.875rem;
  margin:0;
}
.error-state{
  align-items:center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:3rem 1rem;
  text-align:center;
}

.error-state p{
  color:#dc2626;
  font-size:.875rem;
  margin:0 0 1rem;
}

.error-state button{
  background-color:#3b82f6;
  border:none;
  border-radius:.375rem;
  color:#fff;
  cursor:pointer;
  font-size:.875rem;
  font-weight:500;
  padding:.5rem 1rem;
  transition:background-color .2s;
}

.error-state button:hover{
  background-color:#2563eb;
}
.empty-state{
  align-items:center;
  background:linear-gradient(135deg, #f0fdf4, #ecfdf5 50%, #f0f9ff);
  border-radius:1rem;
  display:flex;
  flex-direction:column;
  justify-content:center;
  margin:1rem;
  padding:3rem 2rem;
  text-align:center;
}

.empty-icon{
  animation:bounceIn .6s ease-out;
  font-size:4rem;
  margin-bottom:1.5rem;
}

@keyframes bounceIn{
  0%{
    opacity:0;
    transform:scale(.3);
  }
  50%{
    transform:scale(1.05);
  }
  70%{
    transform:scale(.9);
  }
  to{
    opacity:1;
    transform:scale(1);
  }
}

.empty-state h3{
  color:#059669;
  font-size:1.5rem;
  font-weight:700;
  margin:0 0 .75rem;
}

.empty-state p{
  color:#374151;
  font-size:1rem;
  line-height:1.5;
  margin:0;
  max-width:320px;
}

.empty-subtitle{
  color:#6b7280 !important;
  font-size:.875rem !important;
  margin-top:.5rem !important;
}
@media (max-width:640px){
  .catch-up-modal{
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
    max-height:90vh;
    max-width:100%;
  }

  .modal-header{
    align-items:flex-start;
    flex-direction:column;
    gap:1rem;
    padding:1rem;
  }

  .modal-actions{
    justify-content:space-between;
    width:100%;
  }

  .catch-up-content,.module-section{
    padding:1rem;
  }

  .module-header{
    align-items:flex-start;
    flex-direction:column;
    gap:.5rem;
  }

  .view-all-link{
    align-self:flex-start;
  }

  .preview-title{
    display:-webkit-box;
    -webkit-line-clamp:2;
    white-space:normal;
    -webkit-box-orient:vertical;
  }
}
.catch-up-content::-webkit-scrollbar{
  width:8px;
}

.catch-up-content::-webkit-scrollbar-track{
  background:#f3f4f6;
}

.catch-up-content::-webkit-scrollbar-thumb{
  background:#d1d5db;
  border-radius:4px;
}

.catch-up-content::-webkit-scrollbar-thumb:hover{
  background:#9ca3af;
}
.module-section{
  animation:fadeInUp .3s ease;
}

@keyframes fadeInUp{
  0%{
    opacity:0;
    transform:translateY(10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}


/* source: voice-ui.css */
/**
 * Voice Message UI Styles
 * Styling for VoiceRecorder and VoicePlayer components
 * Matches the Community platform design system
 */

/* ============================================================================
   VOICE RECORDER STYLES
   ============================================================================ */

.voice-recorder {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.voice-recorder-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-600);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  user-select: none;
  touch-action: none;
}

.voice-recorder-button:hover:not(:disabled) {
  background-color: var(--color-primary-700);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.voice-recorder-button:active:not(:disabled) {
  transform: scale(0.95);
}

.voice-recorder-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voice-recorder-button:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

.voice-recorder-button.recording {
  background-color: var(--color-error-600);
  animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

.voice-icon {
  width: 24px;
  height: 24px;
}

/* Recording Overlay */

.voice-recording-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-base);
  touch-action: none;
}

.voice-recording-panel {
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-8);
  width: 90%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  animation: slideUp var(--transition-base);
}

.voice-recording-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-6);
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.recording-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background-color: var(--color-error-600);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.recording-text {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.recording-duration {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  transition: color var(--transition-base);
}

.recording-duration.warning {
  color: var(--color-error-600);
  animation: blink 0.5s infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Waveform Canvas */

.voice-waveform-canvas {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary-50) 0%, var(--color-secondary-50) 100%);
  margin-bottom: var(--spacing-6);
}

.voice-recording-footer {
  text-align: center;
}

.cancel-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.cancel-hint svg {
  width: 16px;
  height: 16px;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* ============================================================================
   VOICE PLAYER STYLES
   ============================================================================ */

.voice-player {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
  padding: var(--spacing-4);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  max-width: 400px;
}

.voice-player-main {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

/* Play Button */

.voice-play-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-600);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.voice-play-button:hover:not(:disabled) {
  background-color: var(--color-primary-700);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.voice-play-button:active:not(:disabled) {
  transform: scale(0.95);
}

.voice-play-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voice-play-button:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

.voice-play-button svg {
  width: 24px;
  height: 24px;
}

/* Loading Spinner */

.loading-spinner {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Player Content */

.voice-player-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  min-width: 0;
}

/* Waveform Container */

.voice-waveform-container {
  position: relative;
  width: 100%;
  height: 40px;
}

.voice-waveform-static {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
}

/* Progress Bar */

.voice-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.voice-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-sm);
  pointer-events: none;
  transition: width 0.1s linear;
}

.voice-progress-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: var(--color-primary-600);
  border: 2px solid var(--color-white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.voice-progress-bar:hover .voice-progress-handle {
  opacity: 1;
}

/* Player Controls */

.voice-player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-2);
}

.voice-time-display {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

.voice-speed-button {
  padding: var(--spacing-1) var(--spacing-2);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  background-color: transparent;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 36px;
}

.voice-speed-button:hover {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  border-color: var(--color-primary-500);
}

.voice-speed-button:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 1px;
}

/* Warning Message */

.voice-warning {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--color-warning-50);
  border-left: 3px solid var(--color-warning-500);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-warning-700);
}

.voice-warning svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Transcription Toggle */

.voice-transcription-toggle {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  width: 100%;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary-600);
  background-color: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.voice-transcription-toggle:hover {
  background-color: var(--color-primary-50);
}

.voice-transcription-toggle:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 1px;
}

.voice-transcription-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
}

/* Transcription Panel */

.voice-transcription-panel {
  padding: var(--spacing-3);
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-md);
  animation: slideDown var(--transition-base);
}

.voice-transcription-content {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-2);
}

.voice-transcription-meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  padding-top: var(--spacing-2);
  border-top: 1px solid var(--color-border-subtle);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  /* Larger touch targets on mobile */
  .voice-recorder-button {
    width: 52px;
    height: 52px;
  }

  .voice-play-button {
    width: 52px;
    height: 52px;
  }

  .voice-icon {
    width: 28px;
    height: 28px;
  }

  .voice-recording-panel {
    width: 95%;
    padding: var(--spacing-6);
  }

  .voice-waveform-canvas {
    height: 60px;
  }

  .voice-player {
    max-width: 100%;
  }

  /* Make progress bar easier to tap */
  .voice-progress-bar {
    padding: var(--spacing-2) 0;
  }

  .voice-progress-handle {
    width: 16px;
    height: 16px;
    opacity: 1;
  }
}

/* ============================================================================
   DARK MODE SUPPORT
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  .voice-waveform-canvas {
    background: linear-gradient(135deg, var(--color-primary-900) 0%, var(--color-secondary-900) 100%);
  }

  .voice-player {
    background-color: var(--color-gray-800);
  }

  .voice-transcription-panel {
    background-color: var(--color-gray-800);
  }

  .voice-warning {
    background-color: rgba(251, 191, 36, 0.1);
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Ensure focus indicators are visible */
*:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .voice-recorder-button.recording,
  .recording-dot,
  .recording-duration.warning,
  .cancel-hint svg,
  .spinner {
    animation: none;
  }

  .voice-progress-fill {
    transition: none;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .voice-recorder-button,
  .voice-play-button {
    border: 2px solid currentColor;
  }

  .voice-progress-handle {
    border-width: 3px;
  }
}

/* ============================================================================
   INTEGRATION WITH CHAT MESSAGE STYLES
   ============================================================================ */

/* Voice player in message bubble */
.message-bubble .voice-player {
  margin: var(--spacing-2) 0;
  max-width: 100%;
}

.message-own .voice-player {
  background-color: rgba(255, 255, 255, 0.1);
}

.message-own .voice-player .voice-time-display {
  color: rgba(255, 255, 255, 0.8);
}

.message-own .voice-player .voice-speed-button {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

.message-own .voice-player .voice-speed-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

/* Voice recorder in message input */
.message-input-wrapper .voice-recorder {
  margin-left: var(--spacing-2);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.voice-player--compact {
  padding: var(--spacing-2);
  max-width: 300px;
}

.voice-player--compact .voice-play-button {
  width: 40px;
  height: 40px;
}

.voice-player--compact .voice-play-button svg {
  width: 20px;
  height: 20px;
}

/* ============================================================================
   VOICE STORY RECORDER MODAL
   ============================================================================ */

.voice-story-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

.voice-story-modal {
  background: var(--color-bg-primary, #fff);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.voice-story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.voice-story-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.voice-story-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-secondary, #6b7280);
  line-height: 1;
  padding: 0.25rem;
}

.voice-story-body {
  padding: 2rem 1.5rem;
}

.voice-story-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.voice-story-mic-icon {
  font-size: 3rem;
}

.voice-story-hint {
  font-size: 0.75rem;
  color: var(--color-text-secondary, #6b7280);
}

.voice-story-record-btn,
.voice-story-stop-btn,
.voice-story-retry-btn,
.voice-story-another-btn {
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.voice-story-record-btn {
  background: var(--color-primary, #14b8a6);
  color: #fff;
}

.voice-story-record-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.voice-story-stop-btn {
  background: #ef4444;
  color: #fff;
}

.voice-story-stop-btn:hover {
  background: #dc2626;
}

.voice-story-retry-btn,
.voice-story-another-btn {
  background: var(--color-bg-secondary, #f3f4f6);
  color: var(--color-text-primary, #1f2937);
}

/* Recording state */
.voice-story-recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #ef4444;
}

.voice-story-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.voice-story-waveform {
  width: 100%;
  max-width: 320px;
  height: 64px;
  border-radius: 8px;
  background: var(--color-bg-secondary, #f3f4f6);
}

.voice-story-timer {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary, #1f2937);
}

.voice-story-remaining {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #6b7280);
  min-height: 1.25rem;
}

.voice-story-warning {
  color: #ef4444;
  font-weight: 600;
}

/* Uploading state */
.voice-story-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border, #e5e7eb);
  border-top-color: var(--color-primary, #14b8a6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Editor / Review state */
.voice-story-editor {
  align-items: stretch !important;
  text-align: left;
}

.voice-story-editor-header {
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.voice-story-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 0.25rem;
}

.voice-story-title-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.voice-story-title-input:focus {
  border-color: var(--color-primary, #14b8a6);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}

.voice-story-content-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.voice-story-content-input:focus {
  border-color: var(--color-primary, #14b8a6);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}

.voice-story-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.voice-story-publish-btn {
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  background: var(--color-primary, #14b8a6);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.voice-story-publish-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.voice-story-publish-btn:disabled,
.voice-story-draft-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voice-story-draft-btn {
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  background: transparent;
  color: var(--color-text-primary, #374151);
  border: 1px solid #d1d5db;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.voice-story-draft-btn:hover:not(:disabled) {
  background: #f3f4f6;
}

/* Purpose choice and text result (voice to text) */
.voice-story-choose-heading {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary, #1f2937);
}

.voice-story-player {
  width: 100%;
  max-width: 320px;
}

.voice-story-choose-actions,
.voice-story-text-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
}

.voice-story-text-actions {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.voice-story-choice-primary,
.voice-story-choice-secondary,
.voice-story-choice-quiet {
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.voice-story-choice-primary {
  background: var(--color-primary, #14b8a6);
  color: #fff;
  border: none;
}

.voice-story-choice-primary:hover {
  filter: brightness(1.1);
}

.voice-story-choice-secondary {
  background: transparent;
  color: var(--color-text-primary, #374151);
  border: 1px solid #d1d5db;
}

.voice-story-choice-secondary:hover {
  background: var(--color-bg-secondary, #f3f4f6);
}

.voice-story-choice-quiet {
  background: var(--color-bg-secondary, #f3f4f6);
  color: var(--color-text-primary, #1f2937);
  border: none;
}

.voice-story-text-output {
  width: 100%;
  min-height: 140px;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.voice-story-copy-status {
  min-height: 1.25rem;
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-secondary, #6b7280);
}

.voice-story-save-status {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Error state */
.voice-story-error-icon {
  font-size: 3rem;
}

.voice-story-error-msg {
  color: #ef4444;
}

/* Village AI awareness card */
.awareness-card-ai {
  background: linear-gradient(135deg, var(--color-bg-primary, #fff), rgba(20, 184, 166, 0.05));
  border-color: rgba(20, 184, 166, 0.2);
}

.awareness-card-ai:hover {
  border-color: var(--color-primary, #14b8a6);
}

.awareness-card-ai .awareness-action {
  color: var(--color-primary, #14b8a6);
  font-weight: 600;
  font-size: 0.8rem;
}

/* Voice awareness cards */
.awareness-card-voice {
  background: linear-gradient(135deg, var(--color-bg-primary, #fff), rgba(239, 68, 68, 0.05));
  border-color: rgba(239, 68, 68, 0.15);
}

.awareness-card-voice:hover {
  border-color: rgba(239, 68, 68, 0.4);
}

/* ============================================================================
   POSTCARD COMPOSER MODAL
   ============================================================================ */

.postcard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.postcard-modal {
  background: var(--color-bg-primary, #fff);
  border-radius: 1rem;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.postcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.postcard-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text-primary, #1f2937);
}

.postcard-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-secondary, #6b7280);
  padding: 0.25rem;
  line-height: 1;
}

.postcard-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.postcard-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary, #6b7280);
  margin: 0 0 0.75rem 0;
}

/* Recipient selection */
.postcard-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.postcard-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 1rem;
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-text-primary, #1f2937);
  font-size: 0.8rem;
  cursor: pointer;
}

.postcard-chip:hover {
  background: rgba(239, 68, 68, 0.2);
}

.postcard-chip-x {
  font-weight: bold;
  opacity: 0.5;
}

.postcard-search {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  background: var(--color-bg-primary, #fff);
  color: var(--color-text-primary, #1f2937);
}

.postcard-member-list {
  max-height: 350px;
  overflow-y: auto;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.postcard-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--color-text-primary, #1f2937);
  text-align: left;
}

.postcard-member:hover {
  background: var(--color-bg-secondary, #f9fafb);
}

.postcard-member.selected {
  background: rgba(239, 68, 68, 0.05);
}

.postcard-member + .postcard-member {
  border-top: 1px solid var(--color-border, #e5e7eb);
}

.postcard-member-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-primary, #14b8a6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.postcard-member-name {
  flex: 1;
}

.postcard-check {
  color: #ef4444;
  font-weight: bold;
}

.postcard-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-secondary, #6b7280);
  font-size: 0.875rem;
}

/* Recording state */
.postcard-recorder {
  text-align: center;
}

.postcard-waveform {
  width: 100%;
  height: 60px;
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.05);
  margin-bottom: 0.75rem;
}

.postcard-timer {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ef4444;
  margin-bottom: 0.25rem;
}

.postcard-remaining {
  font-size: 0.8rem;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 1.25rem;
}

.postcard-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Footer / buttons */
.postcard-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.postcard-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--color-border, #e5e7eb);
  cursor: pointer;
  background: var(--color-bg-primary, #fff);
  color: var(--color-text-primary, #1f2937);
}

.postcard-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.postcard-btn-primary {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.postcard-btn-primary:hover:not(:disabled) {
  background: #dc2626;
}

.postcard-btn-stop {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}

.postcard-btn-cancel {
  background: none;
}

/* Review state */
.postcard-review {
  text-align: center;
}

.postcard-preview-audio {
  width: 100%;
  margin-bottom: 1rem;
}

.postcard-photo-attach {
  margin-bottom: 1.25rem;
}

.postcard-photo-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 0.5rem;
}

.postcard-btn-secondary {
  background: var(--color-surface-elevated, #f3f4f6);
  color: var(--color-text-primary, #1f2937);
  border: 1px solid var(--color-border, #e5e7eb);
  cursor: pointer;
}

.postcard-btn-secondary:hover {
  background: var(--color-surface-hover, #e5e7eb);
}

.postcard-photo-preview {
  position: relative;
  display: inline-block;
  max-width: 200px;
  margin: 0 auto;
}

.postcard-photo-preview img {
  width: 100%;
  border-radius: 0.5rem;
  max-height: 150px;
  object-fit: cover;
}

.postcard-photo-remove {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: none;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Photo upload progress indicator */
.postcard-photo-uploading {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

.postcard-photo-uploading span {
  animation: pulse-opacity 1.2s ease-in-out infinite;
}

.postcard-upload-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  margin-top: 0.25rem;
  overflow: hidden;
}

.postcard-upload-bar-fill {
  height: 100%;
  width: 40%;
  background: #fff;
  border-radius: 2px;
  animation: upload-indeterminate 1.2s ease-in-out infinite;
}

/* Photo upload failed: plain inline message with a Retry button */
.postcard-photo-error {
  margin-top: var(--spacing-2, 0.5rem);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.postcard-send-error {
  margin-top: var(--spacing-2, 0.5rem);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.postcard-photo-error:empty,
.postcard-send-error:empty {
  margin-top: 0;
}

.postcard-photo-error p {
  margin: 0 0 var(--spacing-2, 0.5rem);
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes upload-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Status states */
.postcard-status {
  text-align: center;
  padding: 2rem 1rem;
}

.postcard-status p {
  font-size: 1rem;
  font-weight: 500;
  margin: 0.5rem 0;
}

.postcard-status-detail {
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  color: var(--color-text-secondary, #6b7280);
}

.postcard-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--color-border, #e5e7eb);
  border-top-color: #ef4444;
  border-radius: 50%;
  animation: postcard-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes postcard-spin {
  to { transform: rotate(360deg); }
}

.postcard-success-icon {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #22c55e;
  color: white;
  font-size: 1.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.postcard-error p:first-of-type {
  color: #ef4444;
}

/* ============================================================================
   POSTCARDS PAGE (postcards.html)
   ============================================================================ */

.postcards-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.postcards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.postcards-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-primary, #1f2937);
}

.postcards-send-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: #b91c1c;
  color: white;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.postcards-send-btn:hover {
  background: #991b1b;
}

.postcards-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border, #e5e7eb);
  margin-bottom: 1rem;
}

.postcards-tab {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary, #374151);
  cursor: pointer;
  position: relative;
}

.postcards-tab.active {
  color: #b91c1c;
  border-bottom-color: #b91c1c;
}

.postcards-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 1rem;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.375rem;
}

.postcards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.postcards-loading,
.postcards-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-secondary, #6b7280);
}

.postcards-empty-hint {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.postcard-item {
  background: var(--color-bg-primary, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 0.75rem;
  padding: 1rem;
}

.postcard-item.postcard-unlistened {
  border-left: 3px solid #ef4444;
  background: rgba(239, 68, 68, 0.02);
}

.postcard-item-sender {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.postcard-item-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-primary, #14b8a6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.postcard-item-time {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-secondary, #6b7280);
}

.postcard-audio {
  width: 100%;
  height: 2.25rem;
  margin-bottom: 0.5rem;
}

.postcard-transcript {
  font-size: 0.8rem;
  color: var(--color-text-secondary, #6b7280);
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}

.postcard-item-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.postcard-recipient-status {
  font-size: 0.75rem;
  color: var(--color-text-secondary, #6b7280);
}

.postcard-recipient-status.listened {
  color: #22c55e;
}

.postcard-item-photo {
  max-width: 200px;
  max-height: 150px;
  border-radius: 0.5rem;
  object-fit: cover;
  margin-top: 0.5rem;
}

/* source: pwa-install.css */
/**
 * PWA Install Modal Styles
 * Responsive, accessible modal for PWA installation prompts
 */

/* ===========================
   Overlay
   =========================== */
.pwa-install-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 300ms ease;
}

.pwa-install-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ===========================
   Modal Container
   =========================== */
.pwa-install-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  max-width: 480px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 4rem);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.pwa-install-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* ===========================
   Modal Content
   =========================== */
.pwa-modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 4rem);
}

/* Header */
.pwa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.pwa-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.pwa-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  transition: all 150ms ease;
}

.pwa-modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.pwa-modal-close:focus {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

/* Body */
.pwa-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.pwa-icon {
  display: block;
  margin: 0 auto 1rem;
  color: #14b8a6;
  stroke-width: 2;
}

.pwa-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #374151;
  text-align: center;
  margin: 0 0 1.5rem;
}

.pwa-note {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
  margin: 0;
}

/* Benefits List */
.pwa-benefits {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.pwa-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pwa-benefits li {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #374151;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.pwa-benefits li:last-child {
  border-bottom: none;
}

/* Instructions */
.pwa-instructions {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.pwa-instructions-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0c4a6e;
  margin: 0 0 0.75rem;
}

.pwa-instructions-list {
  list-style: none;
  counter-reset: step-counter;
  padding: 0;
  margin: 0;
}

.pwa-instructions-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #1e40af;
}

.pwa-instructions-list li:last-child {
  margin-bottom: 0;
}

.pwa-instructions-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: #3b82f6;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
}

.pwa-instructions-list strong {
  font-weight: 600;
  color: #1e3a8a;
}

/* Footer */
.pwa-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* Buttons */
.pwa-btn {
  flex: 1;
  height: 44px;
  padding: 0 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-btn:focus {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

.pwa-btn-primary {
  background: linear-gradient(to right, #14b8a6, #0d9b8c);
  color: white;
  box-shadow: 0 2px 4px rgba(20, 184, 166, 0.2);
}

.pwa-btn-primary:hover {
  background: linear-gradient(to right, #0d9b8c, #14b8a6);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(20, 184, 166, 0.3);
}

.pwa-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(20, 184, 166, 0.2);
}

.pwa-btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.pwa-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.pwa-btn-secondary:active {
  background: #f3f4f6;
}

/* ===========================
   Install Banner (Alternative)
   =========================== */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 300ms ease;
  z-index: 9997;
}

.pwa-install-banner.show {
  transform: translateY(0);
}

.pwa-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwa-banner-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  color: #14b8a6;
}

.pwa-banner-text {
  flex: 1;
}

.pwa-banner-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem;
}

.pwa-banner-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.pwa-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pwa-banner-btn {
  height: 36px;
  padding: 0 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
}

.pwa-banner-btn-install {
  background: #0f766e;  /* teal-700: WCAG AA */
  color: white;
}

.pwa-banner-btn-install:hover {
  background: #115e59;  /* teal-800 */
}

.pwa-banner-btn-dismiss {
  background: transparent;
  color: #6b7280;
}

.pwa-banner-btn-dismiss:hover {
  background: #f3f4f6;
  color: #111827;
}

/* ===========================
   Dark Mode
   =========================== */
@media (prefers-color-scheme: dark) {
  .pwa-install-modal {
    background: #1f2937;
  }

  .pwa-modal-header {
    border-bottom-color: #374151;
  }

  .pwa-modal-title {
    color: white;
  }

  .pwa-modal-close {
    color: #9ca3af;
  }

  .pwa-modal-close:hover {
    background: #374151;
    color: white;
  }

  .pwa-description {
    color: #d1d5db;
  }

  .pwa-note {
    color: #9ca3af;
  }

  .pwa-benefits {
    background: #111827;
  }

  .pwa-benefits li {
    color: #d1d5db;
    border-bottom-color: #374151;
  }

  .pwa-instructions {
    background: #1e3a5f;
    border-color: #2563eb;
  }

  .pwa-instructions-title {
    color: #93c5fd;
  }

  .pwa-instructions-list li {
    color: #bfdbfe;
  }

  .pwa-instructions-list strong {
    color: #dbeafe;
  }

  .pwa-modal-footer {
    border-top-color: #374151;
    background: #111827;
  }

  .pwa-btn-secondary {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
  }

  .pwa-btn-secondary:hover {
    background: #4b5563;
    border-color: #6b7280;
  }

  .pwa-install-banner {
    background: #1f2937;
    border-top-color: #374151;
  }

  .pwa-banner-title {
    color: white;
  }

  .pwa-banner-description {
    color: #9ca3af;
  }

  .pwa-banner-btn-dismiss {
    color: #9ca3af;
  }

  .pwa-banner-btn-dismiss:hover {
    background: #374151;
    color: white;
  }
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 640px) {
  .pwa-install-modal {
    max-width: none;
    width: 100%;
    max-height: 85vh;
    border-radius: 12px 12px 0 0;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 100%);
  }

  .pwa-install-modal.show {
    transform: translate(-50%, 0);
  }

  .pwa-modal-content {
    max-height: 85vh;
  }

  .pwa-modal-header {
    padding: 1rem;
    flex-shrink: 0;
  }

  .pwa-modal-title {
    font-size: 1.125rem;
  }

  .pwa-modal-body {
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
  }

  .pwa-modal-footer {
    padding: 1rem;
    flex-direction: column-reverse;
    flex-shrink: 0;
  }

  .pwa-btn {
    width: 100%;
  }

  .pwa-banner-content {
    flex-wrap: wrap;
  }

  .pwa-banner-actions {
    width: 100%;
    justify-content: stretch;
  }

  .pwa-banner-btn {
    flex: 1;
  }
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  .pwa-install-overlay,
  .pwa-install-modal,
  .pwa-install-banner,
  .pwa-btn {
    transition: none;
  }
}

/* source: video-call-modal.css */
/**
 * Video Call Modal Styles
 * Full-screen video call overlay
 */

/* Overlay - full screen dark background */
.video-call-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #000;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-call-overlay-visible {
  opacity: 1;
}

/* Container */
.video-call-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Remote video - full screen */
.video-call-remote {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #1a1a2e;
}

/* Local video preview - bottom right corner */
.video-call-local-container {
  position: absolute;
  bottom: 100px;
  right: 20px;
  width: 180px;
  height: 135px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.video-call-local {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #2d2d44;
  transform: scaleX(-1); /* Mirror local video */
}

/* Status overlay - top center */
.video-call-status {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.video-call-target-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.video-call-status-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.video-call-timer {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

/* Controls bar - bottom center */
.video-call-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50px;
  z-index: 10;
}

/* Control buttons */
.video-call-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.video-call-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.video-call-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.video-call-btn:active {
  transform: scale(0.95);
}

/* Muted state */
.video-call-btn.muted {
  background: rgba(239, 68, 68, 0.8);
}

.video-call-btn.muted:hover {
  background: rgba(239, 68, 68, 0.9);
}

/* End call button - always red */
.video-call-btn-end {
  background: #ef4444;
  width: 64px;
  height: 64px;
}

.video-call-btn-end:hover {
  background: #dc2626;
}

/* SVG icons */
.video-call-btn svg {
  width: 24px;
  height: 24px;
}

.video-call-btn-end svg {
  width: 28px;
  height: 28px;
}

/* Audio-only call - show placeholder instead of video */
.video-call-overlay.audio-only .video-call-remote {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.video-call-overlay.audio-only .video-call-local-container {
  display: none;
}

.video-call-overlay.audio-only .video-call-btn-video {
  display: none;
}

/* Avatar placeholder for audio calls */
.video-call-avatar-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #fff;
  text-transform: uppercase;
  z-index: 5;
}

/* Connecting animation */
@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.video-call-status-text.connecting {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .video-call-local-container {
    width: 120px;
    height: 90px;
    bottom: 120px;
    right: 16px;
  }

  .video-call-controls {
    gap: 12px;
    padding: 12px 20px;
  }

  .video-call-btn {
    width: 48px;
    height: 48px;
  }

  .video-call-btn-end {
    width: 56px;
    height: 56px;
  }

  .video-call-target-name {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .video-call-local-container {
    width: 100px;
    height: 75px;
    bottom: 130px;
    right: 12px;
  }

  .video-call-status {
    top: 20px;
  }

  .video-call-controls {
    bottom: 20px;
    gap: 10px;
    padding: 10px 16px;
  }

  .video-call-btn {
    width: 44px;
    height: 44px;
  }

  .video-call-btn-end {
    width: 52px;
    height: 52px;
  }

  .video-call-btn svg {
    width: 20px;
    height: 20px;
  }

  .video-call-btn-end svg {
    width: 24px;
    height: 24px;
  }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .video-call-status {
    top: 10px;
  }

  .video-call-local-container {
    bottom: 80px;
    width: 140px;
    height: 105px;
  }

  .video-call-controls {
    bottom: 10px;
    padding: 8px 16px;
  }

  .video-call-btn {
    width: 40px;
    height: 40px;
  }

  .video-call-btn-end {
    width: 48px;
    height: 48px;
  }
}

/* ========================================
   Incoming Call Notification
   ======================================== */

.incoming-call-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 320px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10001;
  overflow: hidden;
  transform: translateX(400px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.incoming-call-notification.incoming-call-visible {
  transform: translateX(0);
  opacity: 1;
}

.incoming-call-content {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 16px;
}

.incoming-call-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  animation: pulse-ring 1.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.incoming-call-info {
  flex: 1;
  min-width: 0;
}

.incoming-call-type {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.incoming-call-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incoming-call-actions {
  display: flex;
  padding: 0 20px 20px;
  gap: 12px;
}

.incoming-call-btn {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 500;
}

.incoming-call-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.incoming-call-decline {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.incoming-call-decline:hover {
  background: rgba(239, 68, 68, 0.3);
}

.incoming-call-accept {
  background: #10b981;
  color: #fff;
}

.incoming-call-accept:hover {
  background: #059669;
}

.incoming-call-btn svg {
  width: 24px;
  height: 24px;
}

/* Mobile adjustments for notification */
@media (max-width: 480px) {
  .incoming-call-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

/* Federation styles for incoming call */
.incoming-call-federated {
  border-left: 4px solid #8b5cf6;
}

.incoming-call-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.incoming-call-federation-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.incoming-call-federation-badge svg {
  width: 12px;
  height: 12px;
}

.incoming-call-village {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 2px;
}

.incoming-call-federated .incoming-call-icon {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

/* ========================================
   Navbar Presence Component
   ======================================== */

.navbar-presence {
  position: relative;
  display: inline-block;
}

.navbar-presence-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  transition: all 0.2s ease;
}

.navbar-presence-btn:hover {
  background: var(--hover-bg, rgba(0, 0, 0, 0.05));
  color: var(--text-primary, #1f2937);
}

.navbar-presence-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring, rgba(59, 130, 246, 0.5));
}

.navbar-presence-icon {
  width: 20px;
  height: 20px;
}

.navbar-presence-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #10b981;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-presence-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--dropdown-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color, #e5e7eb);
  z-index: 1000;
  overflow: hidden;
}

.navbar-presence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  background: var(--header-bg, #f9fafb);
}

.navbar-presence-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary, #1f2937);
}

.navbar-presence-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.navbar-presence-list {
  max-height: 280px;
  overflow-y: auto;
}

.navbar-presence-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  transition: background 0.15s ease;
}

.navbar-presence-user:hover {
  background: var(--hover-bg, #f3f4f6);
}

.presence-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.presence-online-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  flex-shrink: 0;
}

.presence-user-name {
  font-size: 0.9rem;
  color: var(--text-primary, #1f2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence-user-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.presence-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #6b7280);
  transition: all 0.15s ease;
}

.presence-action-btn:hover {
  background: var(--action-hover-bg, #e5e7eb);
  color: var(--text-primary, #1f2937);
}

.presence-action-call:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.navbar-presence-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary, #6b7280);
  font-size: 0.9rem;
}

.navbar-presence-more {
  padding: 8px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.navbar-presence-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.navbar-presence-view-all {
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--primary-color, #3b82f6);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.navbar-presence-view-all:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .navbar-presence-dropdown {
    background: #1f2937;
    border-color: #374151;
  }

  .navbar-presence-header {
    background: #111827;
    border-color: #374151;
  }

  .navbar-presence-title {
    color: #f9fafb;
  }

  .navbar-presence-user:hover {
    background: #374151;
  }

  .presence-user-name {
    color: #f9fafb;
  }

  .navbar-presence-empty,
  .navbar-presence-more {
    color: #9ca3af;
  }

  .navbar-presence-footer {
    border-color: #374151;
  }
}

/* ========================================
   Federated User Lookup Component
   ======================================== */

.federated-lookup {
  width: 100%;
}

.federated-lookup-search {
  display: flex;
  gap: 0.5rem;
}

.federated-lookup-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.federated-lookup-input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.federated-lookup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #0f766e;  /* teal-700: WCAG AA */
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.federated-lookup-btn:hover {
  background: #115e59;  /* teal-800 */
}

.federated-lookup-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.federated-lookup-results {
  margin-top: 1rem;
}

.federated-lookup-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.875rem;
}

.federated-lookup-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: #14b8a6;
  border-radius: 50%;
  animation: federated-spin 0.8s linear infinite;
}

.federated-lookup-spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: federated-spin 0.8s linear infinite;
}

@keyframes federated-spin {
  to { transform: rotate(360deg); }
}

.federated-lookup-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.875rem;
}

.federated-lookup-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.federated-lookup-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.federated-lookup-user-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #8b5cf6, #14b8a6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.federated-lookup-user-details {
  display: flex;
  flex-direction: column;
}

.federated-lookup-user-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9375rem;
}

.federated-lookup-user-village {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #64748b;
  font-size: 0.8125rem;
}

.federated-lookup-actions {
  display: flex;
  gap: 0.5rem;
}

.federated-lookup-action-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.federated-lookup-call-btn {
  background: #0f766e;  /* teal-700: WCAG AA */
  color: white;
}

.federated-lookup-call-btn:hover {
  background: #115e59;  /* teal-800 */
}

.federated-lookup-add-btn {
  background: #e2e8f0;
  color: #475569;
}

.federated-lookup-add-btn:hover {
  background: #cbd5e1;
}

.federated-lookup-add-btn.federated-lookup-success {
  background: #22c55e;
  color: white;
}

.federated-lookup-action-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .federated-lookup-input {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
  }

  .federated-lookup-input:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
  }

  .federated-lookup-loading {
    background: #1f2937;
    color: #9ca3af;
  }

  .federated-lookup-spinner {
    border-color: #374151;
    border-top-color: #14b8a6;
  }

  .federated-lookup-error {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
  }

  .federated-lookup-user {
    background: #1f2937;
    border-color: #374151;
  }

  .federated-lookup-user-name {
    color: #f9fafb;
  }

  .federated-lookup-user-village {
    color: #9ca3af;
  }

  .federated-lookup-add-btn {
    background: #374151;
    color: #e5e7eb;
  }

  .federated-lookup-add-btn:hover {
    background: #4b5563;
  }
}

/* ==========================================================================
   JITSI INVITATION TOAST
   ========================================================================== */

.jitsi-invitation-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 16px 20px;
  max-width: 380px;
  z-index: 10001;
  animation: slideInRight 0.3s ease-out;
}

.jitsi-invitation-toast.fade-out {
  animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.invitation-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.invitation-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.invitation-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.invitation-text strong {
  color: #111827;
  font-weight: 600;
}

.invitation-text .meeting-name {
  color: #0d9488;
  font-weight: 500;
}

.invitation-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.invitation-actions .btn-join {
  padding: 8px 16px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.invitation-actions .btn-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.invitation-actions .btn-dismiss {
  padding: 8px 16px;
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.invitation-actions .btn-dismiss:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* ==========================================================================
   MEMBER INVITE BUTTON
   ========================================================================== */

.member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-invite-button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.member-invite-button:hover {
  background: #f0fdfa;
  border-color: #0d9488;
  color: #0d9488;
}

.member-invite-button.selected {
  background: #0d9488;
  border-color: #0d9488;
  color: white;
}

.member-invite-button.selected:hover {
  background: #0f766e;
  border-color: #0f766e;
}

/* Invitee count badge */
#inviteeCount {
  font-size: 12px;
  color: #0d9488;
  font-weight: 500;
  margin-left: 8px;
}

/* ==========================================================================
   DARK MODE - INVITATION STYLES
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  .jitsi-invitation-toast {
    background: #1f2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .invitation-text {
    color: #d1d5db;
  }

  .invitation-text strong {
    color: #f9fafb;
  }

  .invitation-actions .btn-dismiss {
    color: #9ca3af;
    border-color: #374151;
  }

  .invitation-actions .btn-dismiss:hover {
    background: #374151;
    border-color: #4b5563;
  }

  .member-invite-button {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
  }

  .member-invite-button:hover {
    background: #0f766e;
    border-color: #0d9488;
    color: white;
  }
}

/* source: dashboard-phase2.css */
/**
 * Dashboard Phase 2 CSS
 * Sparklines, stat drill-down modals, anomaly awareness card
 */

/* === Sparkline Containers === */

.sparkline-container {
  display: block;
  width: 100%;
  height: 30px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sparkline-container.loaded {
  opacity: 1;
}

.sparkline-container svg {
  width: 100%;
  height: 100%;
}

.sparkline-line {
  fill: none;
  stroke: var(--color-primary, #14b8a6);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline-area {
  fill: var(--color-primary, #14b8a6);
  opacity: 0.1;
}

/* === Quick Stat Click Affordance === */

.quick-stat[data-clickable] {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.quick-stat[data-clickable]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15);
}

.quick-stat[data-clickable]:active {
  transform: translateY(0);
}

.quick-stat[data-clickable]::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--color-primary, #14b8a6);
  border-radius: 1px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.quick-stat[data-clickable]:hover::after {
  opacity: 0.5;
}

/* === Stats Detail Modal === */

.stats-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.stats-detail-modal {
  background: var(--bg-card, #ffffff);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: statsModalSlideUp 0.25s ease-out;
}

@keyframes statsModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stats-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.stats-detail-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a2e);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-detail-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  padding: 0.25rem;
  line-height: 1;
  border-radius: 6px;
  transition: background 0.15s;
}

.stats-detail-close:hover {
  background: var(--bg-hover, #f3f4f6);
}

.stats-detail-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

/* Summary stats row */
.stats-summary-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.stats-summary-item {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 0.75rem;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 10px;
}

.stats-summary-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary, #14b8a6);
}

.stats-summary-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Recent items list */
.stats-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stats-recent-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.stats-recent-list li:last-child {
  border-bottom: none;
}

.stats-recent-title {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary, #1a1a2e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-recent-meta {
  font-size: 0.75rem;
  color: var(--text-secondary, #6b7280);
  white-space: nowrap;
}

/* Section heading within modal */
.stats-section-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #6b7280);
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

/* Role/folder breakdown pills */
.stats-breakdown-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.stats-breakdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 999px;
  font-size: 0.8125rem;
}

.stats-breakdown-pill .pill-count {
  font-weight: 600;
  color: var(--color-primary, #14b8a6);
}

.stats-breakdown-pill .pill-label {
  color: var(--text-secondary, #6b7280);
}

/* Loading spinner in modal */
.stats-detail-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary, #6b7280);
}

/* === Anomaly Awareness Card === */

.awareness-card-anomaly {
  border-left: 3px solid #f59e0b;
}

.awareness-card-anomaly .awareness-badge {
  background: #f59e0b;
  color: #fff;
}

/* === Anomaly Detail Modal === */

.anomaly-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.anomaly-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: var(--bg-secondary, #f8fafc);
}

.anomaly-item.severity-error {
  border-left: 3px solid #ef4444;
}

.anomaly-item.severity-warning {
  border-left: 3px solid #f59e0b;
}

.anomaly-item.severity-info {
  border-left: 3px solid #3b82f6;
}

.anomaly-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.anomaly-content {
  flex: 1;
  min-width: 0;
}

.anomaly-person {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary, #1a1a2e);
}

.anomaly-message {
  font-size: 0.8125rem;
  color: var(--text-secondary, #6b7280);
  margin-top: 0.125rem;
}

.anomaly-suggestion {
  font-size: 0.75rem;
  color: var(--color-primary, #14b8a6);
  margin-top: 0.25rem;
  font-style: italic;
}

/* === Dark Theme === */

[data-theme="dark"] .stats-detail-modal {
  background: var(--bg-card, #1e1e2e);
}

[data-theme="dark"] .stats-summary-item {
  background: var(--bg-secondary, #2a2a3a);
}

[data-theme="dark"] .anomaly-item {
  background: var(--bg-secondary, #2a2a3a);
}

[data-theme="dark"] .stats-breakdown-pill {
  background: var(--bg-secondary, #2a2a3a);
}

/* === Mobile === */

@media (max-width: 480px) {
  .stats-detail-modal {
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 90vh;
  }

  .stats-detail-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .stats-summary-row {
    gap: 0.5rem;
  }

  .stats-summary-item {
    min-width: 60px;
    padding: 0.5rem;
  }

  .stats-summary-value {
    font-size: 1.25rem;
  }
}
