/* --- Split from inline <style> blocks --- */

/* ===== PWA STYLES ===== */
/* Status bar para iPhone */
@supports (padding: max(0px)) {
  body {
    padding-top: max(0px, env(safe-area-inset-top));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* Esconder elementos quando em modo standalone */
@media all and (display-mode: standalone) {
  #pwa-install-prompt {
    display: none !important;
  }
  
  /* Melhorar espaçamento para PWA */
  body {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Melhorar experiência touch */
@media (hover: none) and (pointer: coarse) {
  button, a, [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Prevenir zoom em inputs no iOS */
@media screen and (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}


    body{font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial}
    .shadow-soft{box-shadow:0 12px 26px rgba(17,17,18,.08)}
    .ring-subtle{box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}
    .fade{animation:fade .18s ease-out}
    .pop{animation:pop .18s ease-out}
    @keyframes fade{from{opacity:0}to{opacity:1}}
    @keyframes pop{from{transform:translateY(6px) scale(.98);opacity:0}to{transform:none;opacity:1}}
    ::-webkit-scrollbar{width:10px;height:10px}
    ::-webkit-scrollbar-thumb{background:#dedede;border-radius:999px}
    ::-webkit-scrollbar-track{background:transparent}
    .star-rating input[type="radio"] { display: none; }
    .star-rating label { font-size: 28px; color: #ddd; cursor: pointer; transition: color 0.2s; }
    .star-rating input[type="radio"]:checked ~ label,
    .star-rating label:hover,
    .star-rating label:hover ~ label { color: #facc15; /* yellow-400 */ }
    .progress-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        height: 4px;
        background-color: #f472b6; /* pink-500 */
        transition: width 0.2s ease-out;
    }
    
    /* Ultra-optimized image loading with extreme performance */
    .image-container {
        position: relative;
        overflow: hidden;
        background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        background-color: #f3f4f6;
        will-change: transform;
        transform: translateZ(0);
        contain: layout style paint;
        isolation: isolate;
    }
    
    /* Dark theme shimmer effect */
    [data-theme="dark"] .image-container {
        background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        background-color: #1f2937;
    }
    
    @keyframes shimmer {
        0% { background-position: -200% 0; }
        100% { background-position: 200% 0; }
    }
    
    .image-container img {
        opacity: 0;
        transition: opacity 0.1s ease-in-out;
        will-change: opacity, transform;
        backface-visibility: hidden;
        transform: translateZ(0);
        contain: layout style paint;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        isolation: isolate;
    }
    
    .image-container img.loaded {
        opacity: 1;
        animation: ultraFadeIn 0.1s ease-out;
    }
    
    @keyframes ultraFadeIn {
        from { opacity: 0; transform: scale(0.995); }
        to { opacity: 1; transform: scale(1); }
    }
    
    /* Optimized image loading */
    img {
        will-change: opacity;
        backface-visibility: hidden;
        transform: translateZ(0);
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        contain: layout style paint;
        isolation: isolate;
    }
    
    /* Ultra-fast progressive image loading */
    img[loading="eager"] {
        opacity: 0;
        transition: opacity 0.05s ease-in;
    }
    
    img[loading="eager"].loaded {
        opacity: 1;
    }
    
    img[loading="lazy"] {
        opacity: 0;
        transition: opacity 0.1s ease-in;
    }
    
    img[loading="lazy"].loaded {
        opacity: 1;
    }
    
    /* Performance optimizations */
    .carousel-container {
        contain: layout style;
        will-change: scroll-position;
        isolation: isolate;
    }
    
    .carousel-container > * {
        contain: layout style paint;
        will-change: transform;
        isolation: isolate;
    }
    
    /* Ultra-fast avatar optimization */
    #user-avatar-img {
        will-change: opacity;
        backface-visibility: hidden;
        transform: translateZ(0);
        contain: layout style paint;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Today badge icon - always orange */
    .today-badge svg {
        color: #fed7aa !important; /* orange-100 */
        stroke: #fed7aa !important;
    }
    
    /* Dark theme adjustments for today badge */
    [data-theme="dark"] .today-badge svg {
        color: #fed7aa !important; /* Keep orange in dark mode */
        stroke: #fed7aa !important;
    }
    
    /* Footer and warning hidden via JavaScript in admin page */
    
    /* Eventos de hoje - destaque especial */
    .today-event {
        position: relative;
        margin: 3px; /* Reduzir margem para borda mais fina */
        border: 1.5px solid rgba(249, 115, 22, 0.3); /* Borda mais fina e elegante */
        border-radius: 1.5rem;
        box-shadow: 0 0 0 0.5px rgba(249, 115, 22, 0.15); /* Sombra mais sutil */
    }
    
    .today-event::before {
        content: '';
        position: absolute;
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
        border-radius: 1.5rem;
        background: linear-gradient(45deg, rgba(249, 115, 22, 0.08), rgba(251, 146, 60, 0.03));
        pointer-events: none;
        z-index: -1;
    }
    
    .today-event:hover {
        border-color: rgba(249, 115, 22, 0.5);
        transform: translateY(-1px);
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
    }
    
    .today-event:hover::before {
        background: linear-gradient(45deg, rgba(249, 115, 22, 0.12), rgba(251, 146, 60, 0.06));
    }
    
    /* Animação sutil para eventos de hoje */
    @keyframes today-pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.8; }
    }
    
    .today-event .today-badge {
        animation: today-pulse 2s ease-in-out infinite;
    }
    
    /* Badge positioning improvements */
    .friends-going-badge {
        z-index: 10;
    }
    
    .today-badge {
        z-index: 10;
        box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
        transition: all 0.2s ease;
    }
    
    .today-badge:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    }
    
    /* Mobile badge positioning */
    @media (max-width: 768px) {
        /* Ensure badges don't overlap on mobile */
        .friends-going-badge {
            z-index: 15;
        }
        
        .today-badge {
            z-index: 15;
        }
    }
    
    /* Carousel adjustments for today-event margins */
    .carousel-container {
        padding: 8px; /* Aumentar padding para acomodar a borda */
        overflow-x: auto;
        overflow-y: visible; /* Permitir que elementos sejam exibidos verticalmente */
    }
    
    /* Ensure carousel items have proper spacing */
    .carousel-container > * {
        margin: 0 4px;
        flex-shrink: 0; /* Evitar que os cards sejam comprimidos */
    }
    
    /* Mobile specific adjustments */
    @media (max-width: 768px) {
        .carousel-container {
            padding: 8px; /* Mais padding em mobile */
            margin: -4px; /* Compensar o padding extra */
        }
        
        .today-event {
            margin: 4px; /* Mais margem em mobile */
        }
        
        .today-event::before {
            top: -4px;
            left: -4px;
            right: -4px;
            bottom: -4px;
        }
    }
    
    /* Ensure carousel items have proper spacing */
    .carousel-container > * {
        margin: 0 3px;
    }
    
    /* Mobile optimizations */
    @media (max-width: 768px) {
        /* Remove preload for hero image on mobile */
        .hero-image-preload {
            display: none !important;
        }
        
        /* Improve hero section spacing on mobile */
        #hero-section {
            padding-top: 2rem;
            padding-bottom: 2rem;
        }
        
        /* Center content better on mobile */
        #hero-section .text-center {
            max-width: 100%;
        }
    }
    
    /* Footer styles */
    footer {
        position: relative;
        z-index: 10;
    }
    
    footer .bg-yellow-50 {
        background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    }
    
    footer .bg-yellow-50:hover {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        transition: background 0.3s ease;
    }
    
    #footer-whatsapp-link:hover {
        transform: translateY(-1px);
        transition: all 0.2s ease;
    }
    
    #footer-whatsapp-link svg {
        transition: transform 0.2s ease;
    }
    
    #footer-whatsapp-link:hover svg {
        transform: scale(1.1);
    }
    
    /* Swipe to delete styles */
    .notification-item {
        position: relative;
        overflow: hidden;
        touch-action: pan-y; /* Permite rolagem vertical */
        transition: opacity 0.3s ease-out, max-height 0.3s ease-out, margin 0.3s ease-out;
    }
    .notification-content {
        position: relative;
        z-index: 10;
        background-color: white;
        transition: transform 0.2s ease-out;
        will-change: transform;
    }
    .delete-background {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100px;
        background-color: #ef4444; /* red-500 */
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        opacity: 0;
        transition: opacity 0.2s ease-out;
        z-index: 1;
    }
    .notification-item.swiping .notification-content {
        transition: none;
    }
    .notification-item.swiping .delete-background {
        opacity: 1;
    }
    .notification-item.deleting {
        opacity: 0;
        max-height: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-width: 0 !important;
    }

    /* Estilos do Toast (Notificação) */
    .toast-in { animation: toast-in 0.3s ease-out forwards; }
    .toast-out { animation: toast-out 0.3s ease-in forwards; }
    @keyframes toast-in {
      from { transform: translateY(20px) scale(0.95); opacity: 0; }
      to { transform: translateY(0) scale(1); opacity: 1; }
    }
    @keyframes toast-out {
      from { transform: translateY(0) scale(1); opacity: 1; }
      to { transform: translateY(20px) scale(0.95); opacity: 0; }
    }


    /* Custom styles for mobile admin view */
    @media (max-width: 767px) {
      /* Remove a visualização de tabela tradicional */
      .admin-table-container table,
      .admin-table-container thead,
      .admin-table-container tbody,
      .admin-table-container th,
      .admin-table-container td,
      .admin-table-container tr {
        display: block;
      }
      
      .admin-table-container thead {
        display: none;
      }

      .admin-table-container tr {
        background-color: white;
        border-radius: 1rem; /* rounded-2xl */
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
        border: 1px solid #f3f4f6; /* border-gray-100 */
      }

      .admin-table-container td {
        border: none;
        padding: 0.5rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
      }
      
      /* Adiciona um "label" antes de cada célula de dados */
      .admin-table-container td:before {
        content: attr(data-label);
        font-weight: 500;
        color: #6b7280; /* text-gray-500 */
        font-size: 0.875rem;
      }

      .admin-table-container .event-cell {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid #f3f4f6;
      }

      .admin-table-container .event-cell:before {
        display: none; /* O card do evento não precisa de label */
      }
      
      .admin-table-container .actions-cell {
        padding-top: 0.75rem;
      }
      .admin-table-container .actions-cell:before {
        display: none; /* Célula de ações não precisa de label */
      }
      
      /* Carousel de fotos do evento na visualização mobile */
      #view-gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch; /* Rolagem suave no iOS */
        padding-bottom: 8px; /* Espaço para a barra de rolagem */
        gap: 0.75rem; /* Adiciona espaço entre as imagens */
      }
      #view-gallery::-webkit-scrollbar {
        height: 6px;
      }
      #view-gallery::-webkit-scrollbar-thumb {
        background-color: #e5e7eb; /* bg-gray-200 */
        border-radius: 999px;
      }
      #view-gallery > img {
        width: 85%; /* Cada imagem ocupa 85% da largura do container */
        flex-shrink: 0;
        scroll-snap-align: center; /* Centraliza a imagem ao parar de rolar */
      }
    }
    
    /* NOVOS ESTILOS PARA FILTROS */
    #filters-bar.filters-open #filters-chevron {
        transform: rotate(180deg);
    }
    #filters-content {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.3s ease-out;
    }
    #filters-bar.filters-open #filters-content {
        grid-template-rows: 1fr;
    }
    #filters-content > .inner-filter-content {
        overflow: hidden;
    }
  
/* === Fixes rápidos de mobile para Taxonomias + selects múltiplos === */
@media (max-width: 640px) {
  /* Painel de Bairros & Gêneros */
  #taxonomy-panel .grid { grid-template-columns: 1fr !important; }
  #taxonomy-panel form { flex-direction: column; gap: .5rem; }
  #taxonomy-panel form input, #taxonomy-panel form button { width: 100%; }
  #bairro-list, #genero-list { max-height: 220px; overflow-y: auto; }
  /* Select múltiplo nos modais de evento */
  #ev-genero, #org-ev-genero { max-height: 180px; }
}
/* Estilo dos itens das listas de Bairros/Gêneros para melhor leitura no mobile */
#bairro-list li, #genero-list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .5rem .75rem; border: 1px solid #f3f4f6;
  border-radius: .75rem; background: #fff;
}
#bairro-list li button, #genero-list li button { color: #ef4444; font-weight: 600; }
#ev-genero, #org-ev-genero { min-height: 160px; }


/* === FINAL dark fixes: gradients, admin wrapper, selects === */
/* Gradients that use Tailwind CSS variables */
[data-theme="dark"] [class*="from-white"] {
  --tw-gradient-from: rgb(15 18 24 / 1) !important;
  --tw-gradient-to: rgb(15 18 24 / 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
[data-theme="dark"] [class*="via-white"] {
  --tw-gradient-stops: var(--tw-gradient-from), rgb(15 18 24 / 1), var(--tw-gradient-to) !important;
}
[data-theme="dark"] [class*="to-white"] {
  --tw-gradient-to: rgb(15 18 24 / 1) !important;
}
/* Gray variants that sometimes appear in gradients */
[data-theme="dark"] [class*="from-gray-50"] {
  --tw-gradient-from: rgb(20 25 36 / 1) !important;
  --tw-gradient-to: rgb(20 25 36 / 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
[data-theme="dark"] [class*="via-gray-50"] {
  --tw-gradient-stops: var(--tw-gradient-from), rgb(20 25 36 / 1), var(--tw-gradient-to) !important;
}
[data-theme="dark"] [class*="to-gray-50"] {
  --tw-gradient-to: rgb(20 25 36 / 1) !important;
}

/* Fallback for explicit gradient utilities */
[data-theme="dark"] .bg-gradient-to-t[class*="from-white"] { background-image: linear-gradient(to top, rgba(15,18,24,1), rgba(15,18,24,0)) !important; }
[data-theme="dark"] .bg-gradient-to-b[class*="from-white"] { background-image: linear-gradient(to bottom, rgba(15,18,24,1), rgba(15,18,24,0)) !important; }
[data-theme="dark"] .bg-gradient-to-r[class*="from-white"] { background-image: linear-gradient(to right, rgba(15,18,24,1), rgba(15,18,24,0)) !important; }
[data-theme="dark"] .bg-gradient-to-l[class*="from-white"] { background-image: linear-gradient(to left, rgba(15,18,24,1), rgba(15,18,24,0)) !important; }

/* Admin cards wrapper: ensure top header area isn't white */
[data-theme="dark"] #view-admin .rounded-3xl { background-color: var(--rf-elev) !important; }

/* Notifications: ensure containers are dark even without ring classes */
[data-theme="dark"] #view-social .rounded-2xl { background-color: #0f1218 !important; border-color: var(--rf-border) !important; }

/* Form selects (multiple) – default highlight is too clara in dark */
[data-theme="dark"] select[multiple] option { background-color: #0f1218 !important; color: var(--rf-text) !important; }
[data-theme="dark"] select[multiple] option:checked { background-color: #1b2230 !important; color: var(--rf-text) !important; }


/* === Additional fixes: table row whites & modal footer clip === */

/* Force table parts transparent so row utilities can't show white */
[data-theme="dark"] table,
[data-theme="dark"] thead,
[data-theme="dark"] tbody,
[data-theme="dark"] tr { background-color: transparent !important; }

/* Rows using Tailwind odd:/even: background utilities */
[data-theme="dark"] .odd\:bg-white:nth-child(odd),
[data-theme="dark"] .even\:bg-white:nth-child(even),
[data-theme="dark"] .odd\:bg-gray-50:nth-child(odd),
[data-theme="dark"] .even\:bg-gray-50:nth-child(even) { background-color: var(--rf-surface) !important; }

/* Hover variants on rows */
[data-theme="dark"] .hover\:bg-white:hover,
[data-theme="dark"] .hover\:bg-gray-50:hover { background-color: #131722 !important; }

/* Arbitrary small opacities that might still appear */
[data-theme="dark"] .bg-white\/5 { background-color: rgba(15,18,24,.95) !important; }
[data-theme="dark"] .bg-white\/0 { background-color: rgba(15,18,24,0) !important; }

/* Divider lines */
[data-theme="dark"] .divide-y > :not([hidden]) ~ :not([hidden]) { border-color: var(--rf-border) !important; }

/* Modal/card rounded containers: clip internal gradients so no white bars escape */
.fixed.inset-0 .rounded-2xl,
.fixed.inset-0 .rounded-3xl { overflow: hidden !important; }

/* Footer fade bars inside modals should match surface on dark */
[data-theme="dark"] .bg-gradient-to-t.from-white { 
  background-image: linear-gradient(to top, rgba(15,18,24,1), rgba(15,18,24,0)) !important;
}



/* --- next block --- */



/* === Dark mode main palette & admin collapsibles === */
:root {
  --rf-bg: #0b0d12;
  --rf-surface: #0f1218;
  --rf-elev: #141924;
  --rf-text: #e5e7eb;
  --rf-muted: #a3a3a3;
  --rf-border: #283140;
  --rf-ring: rgba(148,163,184,.25);
}
[data-theme="dark"] body { background: var(--rf-bg) !important; color: var(--rf-text) !important; }
[data-theme="dark"] header { background: rgba(15,18,24,.8) !important; border-color: var(--rf-border) !important; }
[data-theme="dark"] .bg-white { background-color: var(--rf-surface) !important; }
[data-theme="dark"] .bg-gray-50 { background-color: var(--rf-surface) !important; }
[data-theme="dark"] .text-gray-900 { color: var(--rf-text) !important; }
[data-theme="dark"] .text-gray-800 { color: var(--rf-text) !important; }
[data-theme="dark"] .text-gray-700 { color: #d1d5db !important; }
[data-theme="dark"] .text-gray-600 { color: #cbd5e1 !important; }
[data-theme="dark"] .text-gray-500 { color: var(--rf-muted) !important; }
[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-300 { border-color: var(--rf-border) !important; }
[data-theme="dark"] .ring-subtle { box-shadow: inset 0 0 0 1px var(--rf-ring) !important; }
[data-theme="dark"] .shadow-soft { box-shadow: 0 16px 32px rgba(0,0,0,.45) !important; }
[data-theme="dark"] .hover\:bg-gray-50:hover { background-color: #131722 !important; }
[data-theme="dark"] .hover\:bg-gray-50\/70:hover { background-color: #131722 !important; }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background-color: #0f1218 !important;
  border-color: var(--rf-border) !important;
  color: var(--rf-text) !important;
}
[data-theme="dark"] .prose :where(p, li, h1, h2, h3, h4, h5, h6) { color: var(--rf-text) !important; }
[data-theme="dark"] .prose a { color: #f472b6 !important; }
[data-theme="dark"] .bg-gray-100 { background-color: #141924 !important; }
[data-theme="dark"] .bg-gray-200 { background-color: #1b2230 !important; }
[data-theme="dark"] input:focus { box-shadow: 0 0 0 3px rgba(244,114,182,.25) !important; }
[data-theme="dark"] .bg-black\/40 { background-color: rgba(0,0,0,.6) !important; }

.collapsible { border-radius: 1rem; overflow: hidden; }
.collapsible-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}
[data-theme="dark"] .collapsible-toggle { border-color: var(--rf-border); }
.collapsible-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .25s ease; }
.collapsible.collapsed .collapsible-body { grid-template-rows: 0fr; }
.collapsible-body > .collapsible-inner { overflow: hidden; }

@media (max-width: 767px) {
  header .rounded-full { border-radius: 9999px; }
  #view-admin .rounded-3xl.bg-white { padding: 0 !important; }
  #view-admin .collapsible-inner { padding: 1rem; }
  #view-admin .collapsible-toggle { position: sticky; top: 0; background: inherit; }
  #home-view .grid, #view-social .grid { gap: .75rem !important; }
}
@media (min-width: 1024px) {
  #view-admin .rounded-3xl.bg-white { border: 1px solid rgba(148,163,184,.15); }
  [data-theme="dark"] #view-admin .rounded-3xl.bg-white { border-color: var(--rf-border); }
}


/* === Extra dark fixes for semi-transparent whites & tables === */
[data-theme="dark"] .bg-white\/95 { background-color: rgba(15,18,24,.95) !important; }
[data-theme="dark"] .bg-white\/90 { background-color: rgba(15,18,24,.90) !important; }
[data-theme="dark"] .bg-white\/80 { background-color: rgba(15,18,24,.80) !important; }
[data-theme="dark"] .bg-white\/70 { background-color: rgba(15,18,24,.70) !important; }
[data-theme="dark"] .bg-white\/60 { background-color: rgba(15,18,24,.60) !important; }
[data-theme="dark"] .bg-white\/50 { background-color: rgba(15,18,24,.50) !important; }
[data-theme="dark"] .bg-white\/40 { background-color: rgba(15,18,24,.40) !important; }
[data-theme="dark"] .bg-white\/30 { background-color: rgba(15,18,24,.30) !important; }
[data-theme="dark"] .bg-white\/20 { background-color: rgba(15,18,24,.20) !important; }
[data-theme="dark"] .bg-white\/10 { background-color: rgba(15,18,24,.10) !important; }
[data-theme="dark"] .bg-gray-50\/90 { background-color: rgba(20,25,36,.90) !important; }
[data-theme="dark"] .bg-gray-50\/80 { background-color: rgba(20,25,36,.80) !important; }
[data-theme="dark"] .bg-gray-50\/70 { background-color: rgba(20,25,36,.70) !important; }
[data-theme="dark"] .bg-gray-100\/80 { background-color: rgba(27,34,48,.80) !important; }
[data-theme="dark"] .bg-gray-100\/70 { background-color: rgba(27,34,48,.70) !important; }
[data-theme="dark"] .bg-slate-50, 
[data-theme="dark"] .bg-gray-50 { background-color: var(--rf-surface) !important; }
[data-theme="dark"] .bg-slate-100, 
[data-theme="dark"] .bg-gray-100 { background-color: #141924 !important; }
[data-theme="dark"] thead tr { background-color: #141924 !important; }
[data-theme="dark"] tr:nth-child(even).bg-white, 
[data-theme="dark"] tr:nth-child(even).bg-gray-50 { background-color: #0f1218 !important; }
[data-theme="dark"] .backdrop-blur, 
[data-theme="dark"] .backdrop-blur-sm, 
[data-theme="dark"] .backdrop-blur-md { background-color: rgba(15,18,24,.85) !important; }
[data-theme="dark"] .ring-1.bg-white,
[data-theme="dark"] .ring-1.bg-gray-50,
[data-theme="dark"] .ring-1.bg-gray-100 {
  background-color: #0f1218 !important;
  border-color: var(--rf-border) !important;
}


/* === Broad catch-alls and rounded containers === */
[data-theme="dark"] [class*="bg-white/"] { background-color: rgba(15,18,24,.88) !important; }
[data-theme="dark"] [class*="bg-gray-50/"] { background-color: rgba(20,25,36,.88) !important; }
[data-theme="dark"] [class*="bg-gray-100/"] { background-color: rgba(27,34,48,.88) !important; }
[data-theme="dark"] [class*="bg-slate-50/"] { background-color: rgba(20,25,36,.88) !important; }
[data-theme="dark"] [class*="bg-neutral-50/"], 
[data-theme="dark"] [class*="bg-zinc-50/"], 
[data-theme="dark"] [class*="bg-neutral-100/"], 
[data-theme="dark"] [class*="bg-zinc-100/"] { background-color: rgba(20,25,36,.88) !important; }
[data-theme="dark"] .bg-neutral-50, 
[data-theme="dark"] .bg-neutral-100,
[data-theme="dark"] .bg-zinc-50,
[data-theme="dark"] .bg-zinc-100,
[data-theme="dark"] .bg-slate-50, 
[data-theme="dark"] .bg-slate-100,
[data-theme="dark"] .bg-gray-50, 
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] .bg-white { background-color: var(--rf-surface) !important; }
[data-theme="dark"] .table-header, 
[data-theme="dark"] thead, 
[data-theme="dark"] thead tr, 
[data-theme="dark"] thead th { background-color: #141924 !important; color: var(--rf-text) !important; }
[data-theme="dark"] .notification-item,
[data-theme="dark"] .notif-item,
[data-theme="dark"] .bg-white.notification,
[data-theme="dark"] .bg-white.rounded-2xl { 
  background-color: #0f1218 !important; 
  border-color: var(--rf-border) !important;
}
[data-theme="dark"] .rounded-2xl.bg-white, 
[data-theme="dark"] .rounded-3xl.bg-white { background-color: var(--rf-elev) !important; }



[data-theme="dark"] #bairro-list li,
[data-theme="dark"] #genero-list li {
  background-color: var(--rf-surface) !important;
  border-color: var(--rf-border) !important;
}

/* Estilos para eventos privados */
.private-event-badge {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.private-event-card {
    border: 2px solid #e9d5ff;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
}

.private-event-card:hover {
    border-color: #c084fc;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
}

/* Estilos para solicitações de eventos privados */
.private-request-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.private-request-card:hover {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border-color: #7dd3fc;
}

/* Otimizações para mobile */
@media (max-width: 768px) {
    .private-request-card {
        padding: 0.4rem !important;
        margin-bottom: 0.4rem !important;
        border-radius: 0.5rem !important;
    }
    
    .private-request-card .event-info h4 {
        font-size: 0.8rem !important;
        margin-bottom: 0.2rem !important;
    }
    
    .private-request-card .event-info p {
        font-size: 0.65rem !important;
    }
    
    .private-request-card .user-avatar {
        width: 1.5rem !important;
        height: 1.5rem !important;
        font-size: 0.7rem !important;
    }
    
    .private-request-card .user-details h5 {
        font-size: 0.7rem !important;
        margin-bottom: 0.1rem !important;
    }
    
    .private-request-card .user-details p {
        font-size: 0.6rem !important;
    }
    
    .private-request-card .request-date {
        font-size: 0.55rem !important;
        margin-top: 0.2rem !important;
    }
    
    /* Reorganizar botões em coluna para mobile */
    .private-request-card .request-actions {
        flex-direction: column !important;
        gap: 0.3rem !important;
        align-items: stretch !important;
    }
    
    .private-request-card .request-actions button {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Estilos para modo escuro nos cards de solicitação */
[data-theme="dark"] .private-request-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-color: #475569;
}

[data-theme="dark"] .private-request-card:hover {
    background: linear-gradient(135deg, #334155, #475569);
    border-color: #64748b;
}

[data-theme="dark"] .bg-gradient-to-r.from-gray-50.to-gray-100 {
    background: linear-gradient(135deg, #374151, #4b5563) !important;
    border-color: #6b7280 !important;
}

[data-theme="dark"] .text-gray-900 {
    color: #f9fafb !important;
}

[data-theme="dark"] .text-gray-600 {
    color: #d1d5db !important;
}

[data-theme="dark"] .text-gray-500 {
    color: #9ca3af !important;
}

/* Estilos para modo escuro nos cards de pessoas aprovadas */
[data-theme="dark"] .bg-gradient-to-r.from-green-50.to-green-100 {
    background: linear-gradient(135deg, #064e3b, #065f46) !important;
    border-color: #047857 !important;
}

[data-theme="dark"] .border-green-200 {
    border-color: #047857 !important;
}

/* Estilos para botões de aprovação/rejeição */
.approve-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.approve-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.reject-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.reject-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Otimizações para mobile nos botões */
@media (max-width: 768px) {
    .approve-btn, .reject-btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.65rem !important;
        gap: 0.15rem !important;
        border-radius: 0.5rem !important;
    }
    
    .approve-btn svg, .reject-btn svg {
        width: 0.7rem !important;
        height: 0.7rem !important;
    }
}

/* Estilos para botão de remover acesso */
.remove-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.remove-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Otimizações para mobile no botão remover */
@media (max-width: 768px) {
    .remove-btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.7rem !important;
        gap: 0.2rem !important;
    }
    
    .remove-btn svg {
        width: 0.8rem !important;
        height: 0.8rem !important;
    }
}

/* Estilos para modo escuro no botão de remover */
[data-theme="dark"] .remove-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

[data-theme="dark"] .remove-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Estilos para mensagens de evento privado */
.private-event-message {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    color: #92400e;
    font-weight: 500;
}

/* Estilos para indicador de evento privado no card */
.private-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(139, 92, 246, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Estilos para área do organizador */
.organizer-section {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.organizer-section h3 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

/* Otimizações para mobile na área do organizador */
@media (max-width: 768px) {
    .organizer-section {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 0.75rem !important;
    }
    
    .organizer-section h3 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Estilos para modo escuro na área do organizador */
[data-theme="dark"] .organizer-section {
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 1px solid #374151;
}

[data-theme="dark"] .organizer-section h3 {
    color: #f9fafb;
}

[data-theme="dark"] .organizer-section .text-gray-500 {
    color: #9ca3af !important;
}

/* Estilos para modo escuro no container principal da área do organizador */
[data-theme="dark"] #view-organizer {
    background: #111827;
}

[data-theme="dark"] #view-organizer .text-gray-500 {
    color: #9ca3af !important;
}

[data-theme="dark"] #view-organizer .text-2xl,
[data-theme="dark"] #view-organizer .text-3xl {
    color: #f9fafb !important;
}

/* Estilos para grid de eventos do organizador */
.organizer-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* Otimizações para mobile no grid de eventos */
@media (max-width: 768px) {
    .organizer-events-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
        margin-top: 0.5rem !important;
    }
}

/* Estilos para cards de eventos do organizador */
.organizer-event-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.organizer-event-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Otimizações para mobile nos cards de eventos */
@media (max-width: 768px) {
    .organizer-event-card {
        padding: 0.5rem !important;
        border-radius: 0.5rem !important;
    }
    
    .organizer-event-card h4 {
        font-size: 0.9rem !important;
    }
    
    .organizer-event-card p {
        font-size: 0.75rem !important;
    }
}

/* Estilos para modo escuro nos cards de eventos do organizador */
[data-theme="dark"] .organizer-event-card {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .organizer-event-card:hover {
    border-color: #4b5563;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #374151;
}

[data-theme="dark"] .organizer-event-card .text-gray-600 {
    color: #d1d5db !important;
}

/* Estilos para status de evento */
.event-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.event-status.private {
    background: #f3e8ff;
    color: #7c3aed;
}

.event-status.public {
    background: #dcfce7;
    color: #16a34a;
}

/* Estilos para modo escuro nos status de evento */
[data-theme="dark"] .event-status.private {
    background: #581c87;
    color: #c084fc;
}

[data-theme="dark"] .event-status.public {
    background: #166534;
    color: #4ade80;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .organizer-events-grid {
        grid-template-columns: 1fr;
    }
    
    .private-indicator {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }
    
    .approve-btn, .reject-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Estilos para botões na área do organizador no modo escuro */
[data-theme="dark"] #btn-new-org-event {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
    border: none;
}

[data-theme="dark"] #btn-new-org-event:hover {
    background: linear-gradient(135deg, #db2777, #be185d);
    opacity: 0.9;
}

/* Estilos para modal de evento privado no modo escuro */
/* Estilos para modo escuro no modal de solicitação de acesso - REMOVIDO */

/* Melhorias para modo escuro no modal mobile */
@media (max-width: 768px) {
    [data-theme="dark"] #private-event-access-modal .bg-white {
        background-color: #1f2937 !important;
        border: 1px solid #374151 !important;
    }
    
    [data-theme="dark"] #private-event-access-modal .bg-purple-100 {
        background: linear-gradient(135deg, #581c87, #4c1d95) !important;
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2) !important;
    }
    
    [data-theme="dark"] #private-event-access-modal .text-purple-600 {
        color: #a855f7 !important;
    }
    
    [data-theme="dark"] #private-event-access-modal .border-gray-200 {
        border-color: #4b5563 !important;
    }
    
    [data-theme="dark"] #private-event-access-modal .hover\:bg-gray-50:hover {
        background-color: #374151 !important;
        border-color: #6b7280 !important;
    }
}

/* Estilos específicos para o botão cancelar no modo escuro */
[data-theme="dark"] #cancel-access-btn {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}

[data-theme="dark"] #cancel-access-btn:hover {
    background-color: #4b5563 !important;
}

/* Estilos para modo escuro no modal de confirmação de remoção */
[data-theme="dark"] #remove-access-modal .bg-white {
    background-color: #1f2937 !important;
    color: #f9fafb !important;
}

[data-theme="dark"] #remove-access-modal .text-gray-900 {
    color: #f9fafb !important;
}

[data-theme="dark"] #remove-access-modal .text-gray-600 {
    color: #d1d5db !important;
}

[data-theme="dark"] #remove-access-modal .text-gray-700 {
    color: #e5e7eb !important;
}

[data-theme="dark"] #remove-access-modal .border-gray-200 {
    border-color: #4b5563 !important;
}

[data-theme="dark"] #remove-access-modal .hover\:bg-gray-50:hover {
    background-color: #374151 !important;
}

[data-theme="dark"] #remove-access-modal .bg-orange-100 {
    background: linear-gradient(135deg, #7c2d12, #9a3412) !important;
}

[data-theme="dark"] #remove-access-modal .text-orange-600 {
    color: #fb923c !important;
}

/* Melhorias no design do modal */
/* Estilos para o modal de solicitação de acesso - REMOVIDO */

/* Melhorias específicas para mobile no modal - REMOVIDO */

/* Animação suave para o modal */
#private-event-access-modal {
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Otimizações para mobile no modal de solicitação de acesso - REMOVIDO */

/* Estilos para o modal de confirmação de remoção de acesso */
#remove-access-modal {
    animation: modalSlideIn 0.3s ease-out;
}

#remove-access-modal .bg-orange-100 {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
}

#remove-access-modal .text-orange-600 {
    color: #ea580c;
}

#remove-access-modal .bg-orange-600 {
    background: linear-gradient(135deg, #ea580c, #dc2626);
}

#remove-access-modal .hover\:opacity-90:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* Otimizações para mobile no modal de confirmação */
@media (max-width: 768px) {
    #remove-access-modal .bg-white {
        padding: 1rem !important;
        border-radius: 0.75rem !important;
        max-width: 300px !important;
        width: 95% !important;
    }
    
    #remove-access-modal .text-xl {
        font-size: 1.125rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #remove-access-modal .text-gray-600 {
        font-size: 0.875rem !important;
        margin-bottom: 1rem !important;
    }
    
    #remove-access-modal .flex.gap-3 {
        gap: 0.5rem !important;
    }
    
    #remove-access-modal button {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        border-radius: 0.5rem !important;
    }
    
    #remove-access-modal .w-16.h-16 {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    #remove-access-modal .h-8.w-8 {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
}

/* Estilos para barra de pesquisa */
.search-container {
    margin-bottom: 1rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    width: 1rem;
    height: 1rem;
}

/* Modo escuro para barra de pesquisa */
[data-theme="dark"] .search-input {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .search-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

[data-theme="dark"] .search-icon {
    color: #9ca3af;
}

/* Otimizações para mobile na barra de pesquisa */
@media (max-width: 768px) {
    .search-container {
        margin-bottom: 0.75rem;
    }
    
    .search-input {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }
    
    .search-icon {
        left: 0.5rem;
        width: 0.875rem;
        height: 0.875rem;
    }
}

/* Estilos para seção de notificações expansível */
#notifications-toggle {
    transition: all 0.2s ease;
}

#notifications-toggle:hover {
    opacity: 0.8;
}

#notifications-toggle-btn {
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#notifications-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#notifications-toggle-btn:active {
    transform: scale(0.95);
}

#notifications-arrow {
    transition: transform 0.3s ease;
}

#notifications-controls {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

#notifications-content {
    transition: max-height 0.3s ease;
}

/* Modo escuro para seção de notificações */
[data-theme="dark"] #notifications-toggle {
    color: #f9fafb;
}

[data-theme="dark"] #notifications-toggle-btn {
    background-color: #374151;
    border: 1px solid #4b5563;
}

[data-theme="dark"] #notifications-toggle-btn:hover {
    background-color: #4b5563;
    border-color: #6b7280;
}

[data-theme="dark"] #notifications-arrow {
    color: #d1d5db;
}

[data-theme="dark"] #notifications-controls {
    color: #d1d5db;
}

/* Estilos para botões de ação em cards */
.approve-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
    justify-content: center;
}

.approve-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #059669, #047857);
}

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

.reject-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
    justify-content: center;
}

.reject-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

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

/* Modo escuro para botões de aprovar/recusar */
[data-theme="dark"] .approve-btn {
    background: linear-gradient(135deg, #059669, #047857);
}

[data-theme="dark"] .approve-btn:hover {
    background: linear-gradient(135deg, #047857, #065f46);
}

[data-theme="dark"] .reject-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

[data-theme="dark"] .reject-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
}
.remove-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
    justify-content: center;
}

.remove-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

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

/* Modo escuro para botões de remover */
[data-theme="dark"] .remove-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

[data-theme="dark"] .remove-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
}

/* Otimizações gerais para mobile */
@media (max-width: 768px) {
    /* Reduzir espaçamentos gerais */
    .space-y-4 > * + * {
        margin-top: 0.75rem !important;
    }
    
    .space-y-6 > * + * {
        margin-top: 1rem !important;
    }
    
    /* Reduzir padding em containers */
    .p-4 {
        padding: 0.75rem !important;
    }
    
    .p-6 {
        padding: 1rem !important;
    }
    
    /* Reduzir margens */
    .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    /* Ajustar tamanhos de fonte */
    .text-lg {
        font-size: 1rem !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
    }
    
    /* Ajustar gaps em flexbox */
    .gap-3 {
        gap: 0.5rem !important;
    }
    
    .gap-4 {
        gap: 0.75rem !important;
    }
    
    /* Ajustar border-radius */
    .rounded-3xl {
        border-radius: 1rem !important;
    }
    
    .rounded-2xl {
        border-radius: 0.75rem !important;
    }
    
    /* Aumentar padding-bottom para evitar que a interface do Safari cubra o conteúdo */
    .pb-28 {
        padding-bottom: 8rem !important; /* Aumentar de 7rem para 8rem em mobile */
    }
    
    /* Aumentar padding-bottom nos carrosséis para melhor espaçamento */
    .carousel-container {
        padding-bottom: 2rem !important; /* Aumentar de 1rem para 2rem */
    }
    
    /* Adicionar padding-bottom extra para a página principal de eventos */
    main {
        padding-bottom: 2rem !important;
    }
    
    /* Garantir que a última seção tenha espaço suficiente */
    section:last-child {
        margin-bottom: 2rem !important;
    }
    
    /* Ajustar elementos sticky para não interferir com a interface do Safari */
    .sticky.bottom-0 {
        bottom: 1rem !important; /* Adicionar margem do bottom para evitar sobreposição */
    }
    
    /* Garantir que botões de ação tenham espaço suficiente */
    .sticky.bottom-0 button {
        margin-bottom: 0.5rem !important;
    }
}

/* Previne rolagem da página de fundo quando modal está aberto */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Ajustes específicos para mobile e Safari */
@media (max-width: 768px) {
    /* Garantir que o viewport seja adequado para dispositivos móveis */
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available; /* Para Safari */
    }
    
    /* Ajustar altura mínima para evitar problemas com interface do Safari */
    html {
        height: -webkit-fill-available;
    }
    
    /* Garantir que o conteúdo principal tenha espaço suficiente */
    #view-home {
        padding-bottom: 3rem !important;
    }
}

/* Melhorias para modais em dispositivos móveis */
@media (max-width: 768px) {
    /* Ajusta altura máxima para evitar problemas com barra de pesquisa em iPhones */
    #user-profile-modal .max-h-\[95vh\] {
        max-height: 85vh;
    }
    
    /* Aumenta margem superior para evitar sobreposição com barra de status */
    #user-profile-modal .mt-4 {
        margin-top: 2rem;
    }
    
    /* Melhora o padding do conteúdo para melhor espaçamento */
    #profile-content {
        padding-bottom: 2rem;
    }
}

/* Estilo do badge de notificação */
#notifications-badge {
    box-shadow: 0 0 0 2px white;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Padroniza sobreposição do modal de perfil acima do event-view */
#user-profile-modal { z-index: 9999 !important; }

/* Garantir que o modal de lista de seguidores apareça por cima do modal de perfil */
#follow-list-modal { z-index: 10000 !important; }

/* Garantir que o toast apareça no topo de tudo */
#toast-container { z-index: 99999 !important; }

/* Garantir que o modal de exclusão de conta fique acima de todos */
#delete-account-modal { z-index: 10020 !important; }

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

/* Melhorias para cards de eventos */
.group h3.break-words {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    min-height: 1.3em;
    margin-bottom: 0.25rem;
}

.group .line-clamp-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    min-height: 1.2em;
    line-height: 1.2;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Aumentar espaço para endereços em cards menores */
@media (max-width: 768px) {
    .group .line-clamp-1 {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-top: 0.125rem;
    }
}

/* Image container adjustments */
.image-container {
    position: relative;
    z-index: 1;
    background-color: #f3f4f6; /* Light gray for light theme */
}

/* Dark theme adjustments for image containers */
[data-theme="dark"] .image-container {
    background-color: #1f2937; /* Dark gray for dark theme */
}

/* Dark theme adjustments for event cards */
[data-theme="dark"] .bg-gray-100 {
    background-color: #1f2937 !important; /* Dark gray for dark theme */
}

/* Fallback for images that haven't loaded yet */
.image-container img:not([src]),
.image-container img[src=""] {
    opacity: 0;
}

.image-container img {
    background-color: transparent; /* Remove any background from img itself */
}

/* Ensure badges are above the image container */
.friends-going-badge,
.today-badge {
    z-index: 20;
}

/* ===== MELHORIAS PARA MODAL DE EVENTO NO MOBILE ===== */
@media (max-width: 768px) {
    /* Aumentar margem superior do modal */
    #event-view .mt-8 {
        margin-top: 0.25rem !important;
    }
    
    /* Reduzir ainda mais a margem no mobile */
    #event-view .mt-4 {
        margin-top: 0.25rem !important;
    }
    
    /* Melhorar altura máxima e rolagem */
    #event-view .max-h-\[92vh\] {
        max-height: 98vh !important;
        height: 98vh !important;
    }
    
    /* Garantir que o conteúdo role corretamente */
    #event-view .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scroll-behavior: smooth;
    }
    
    /* Melhorar espaçamento interno */
    #event-view .p-6 {
        padding: 1rem !important;
    }
    
    /* Ajustar grid para mobile */
    #event-view .grid.md\:grid-cols-\[1\.2fr_\.8fr\] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Melhorar botões no mobile */
    #event-view button,
    #event-view a[role="button"] {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    /* Prevenir scroll da página de fundo */
    #event-view {
        overscroll-behavior: contain;
    }
    
    /* Melhorar área de toque para fechar */
    #event-view [data-close="view"] {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Ajustes específicos para evitar que a barra de pesquisa cubra o conteúdo */
    #event-view {
        margin-top: 2rem !important; /* Aumentar margem superior */
        margin-bottom: 2rem !important; /* Adicionar margem inferior */
        max-height: calc(100vh - 4rem) !important; /* Reduzir altura para dar espaço */
    }
    
    /* Ajustar o container principal do modal */
    #event-view > div:last-child {
        max-height: calc(100vh - 6rem) !important; /* Reduzir altura do container */
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Garantir que o header do modal tenha espaço suficiente */
    #event-view .sticky.top-0 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Ajustar o conteúdo scrollável */
    #event-view .overflow-y-auto {
        max-height: calc(100vh - 12rem) !important; /* Reduzir altura do conteúdo scrollável */
        padding-bottom: 2rem !important; /* Adicionar padding inferior */
    }
    
    /* Garantir que os botões de ação tenham espaço suficiente */
    #event-view aside {
        padding-bottom: 2rem !important;
    }
    
    /* Ajustar espaçamento dos elementos internos */
    #event-view .space-y-4 > * + * {
        margin-top: 1rem !important;
    }
    
    /* Garantir que o último elemento tenha espaço suficiente */
    #event-view aside > div:last-child {
        margin-bottom: 2rem !important;
    }
    
    /* Melhorias específicas para iOS Safari */
    @supports (-webkit-touch-callout: none) {
        #event-view {
            margin-top: 3rem !important; /* Mais espaço para iOS */
            max-height: calc(100vh - 6rem) !important;
        }
        
        #event-view .overflow-y-auto {
            max-height: calc(100vh - 14rem) !important;
            -webkit-overflow-scrolling: touch;
        }
    }
    
    /* Melhorias para dispositivos com notch */
    @media (max-width: 768px) and (min-height: 800px) {
        #event-view {
            margin-top: 3rem !important;
            max-height: calc(100vh - 6rem) !important;
        }
        
        #event-view .overflow-y-auto {
            max-height: calc(100vh - 14rem) !important;
        }
    }
    
    /* Melhorias para dispositivos menores */
    @media (max-width: 768px) and (max-height: 700px) {
        #event-view {
            margin-top: 1rem !important;
            max-height: calc(100vh - 2rem) !important;
        }
        
        #event-view .overflow-y-auto {
            max-height: calc(100vh - 10rem) !important;
        }
        
        #event-view .p-6 {
            padding: 0.75rem !important;
        }
    }
    
    /* Garantir que o modal seja sempre visível */
    #event-view {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 60 !important;
    }
    
    /* Ajustar o container do modal para ser responsivo */
    #event-view > div:last-child {
        position: relative !important;
        width: 96% !important;
        max-width: none !important;
        margin: 2rem auto !important;
        border-radius: 1rem !important;
    }
}

/* Prevenir scroll da página de fundo quando modal está aberto */
#event-view:not(.hidden) ~ * {
    pointer-events: none;
}

/* Melhorar performance de scroll no modal */
#event-view .overflow-y-auto {
    will-change: scroll-position;
    transform: translateZ(0);
}

/* Melhorias adicionais para scroll e acessibilidade */
@media (max-width: 768px) {
    /* Garantir que o scroll funcione suavemente */
    #event-view .overflow-y-auto {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* Melhorar a área de scroll */
    #event-view .flex-1 {
        min-height: 0;
        flex: 1 1 auto;
    }
    
    /* Garantir que os botões sejam sempre acessíveis */
    #event-view button,
    #event-view a[role="button"] {
        position: relative;
        z-index: 10;
    }
    
    /* Adicionar indicador visual de scroll */
    #event-view .overflow-y-auto::-webkit-scrollbar {
        width: 4px;
    }
    
    #event-view .overflow-y-auto::-webkit-scrollbar-track {
        background: transparent;
    }
    
    #event-view .overflow-y-auto::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
    }
    
    /* Garantir que o conteúdo seja sempre visível */
    #event-view .grid {
        min-height: auto;
    }
    
    /* Ajustar espaçamento para melhor legibilidade */
    #event-view .text-lg {
        line-height: 1.4;
    }
    
    #event-view .text-sm {
        line-height: 1.3;
    }
    
    /* Ajustes específicos para mobile - manter alguma cobertura para legibilidade */
    #event-view .fade {
        background: transparent !important; /* Remover completamente a cobertura escura */
        backdrop-filter: none !important; /* Remover blur */
    }
    
    /* Garantir que o modal seja sempre visível */
    #event-view {
        /* Evitar que o modal afete o scroll da página principal */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        /* Usar transform para melhor performance */
        transform: translateZ(0) !important;
        /* Garantir que não cause mudanças no layout */
        will-change: transform;
    }
}

/* Previne rolagem da página de fundo quando modal está aberto */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Melhorias para preservar posição de scroll */
body.modal-open {
    /* Preservar posição de scroll em dispositivos móveis */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Evitar que o scroll seja resetado */
    -webkit-overflow-scrolling: auto;
}

/* Garantir que o modal não afete o scroll da página principal */
#event-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    /* Evitar que o modal cause mudanças no scroll da página */
    transform: translateZ(0);
}

/* Remover cobertura do fundo para permitir visibilidade do conteúdo */
#event-view .fade {
    background: transparent !important; /* Remover completamente a cobertura escura */
    backdrop-filter: none !important; /* Remover blur */
}

/* Em telas maiores, manter transparente */
@media (min-width: 768px) {
    #event-view .fade {
        background: transparent !important; /* Totalmente transparente */
        backdrop-filter: none !important; /* Sem blur */
    }
}

/* Em telas muito grandes, manter transparente */
@media (min-width: 1024px) {
    #event-view .fade {
        background: transparent !important; /* Totalmente transparente */
        backdrop-filter: none !important; /* Sem blur */
    }
}

/* Em telas muito grandes, manter transparente */
@media (min-width: 1024px) {
    #event-view .fade {
        background: transparent !important; /* Totalmente transparente */
        backdrop-filter: none !important; /* Sem blur */
    }
}

/* Melhorar o container do modal para manter legibilidade */
#event-view > div:last-child {
    background: rgba(203, 213, 225, 0.98) !important; /* Bem mais escuro (slate-300) */
    backdrop-filter: blur(10px) !important; /* Blur forte no container */
    border: 1px solid rgba(255, 255, 255, 0.2) !important; /* Borda sutil */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important; /* Sombra elegante */
}

/* Em modo escuro, ajustar o fundo do container */
[data-theme="dark"] #event-view > div:last-child {
    background: rgba(17, 24, 39, 0.98) !important; /* Fundo escuro sólido */
    border: 1px solid rgba(255, 255, 255, 0.1) !important; /* Borda sutil em modo escuro */
}

/* Em mobile, manter o container sólido */
@media (max-width: 768px) {
    #event-view > div:last-child {
        background: rgba(203, 213, 225, 0.98) !important; /* Bem mais escuro (slate-300) */
        backdrop-filter: blur(15px) !important; /* Blur mais forte */
    }
    
    [data-theme="dark"] #event-view > div:last-child {
        background: rgba(17, 24, 39, 0.98) !important; /* Sólido em mobile */
    }
    
    /* Alinhar a foto do evento com as informações */
    #event-view .grid {
        gap: 1.5rem !important; /* Reduzir gap entre foto e informações */
    }
    
    #event-view .grid > div:first-child {
        margin-bottom: 0 !important; /* Remover margem inferior da foto */
    }
    
    #event-view aside {
        margin-top: 0 !important; /* Remover margem superior das informações */
    }
}

/* Alinhar a foto do evento com as informações em todas as telas */
#event-view .grid {
    gap: 1.5rem !important; /* Gap consistente entre foto e informações */
}

#event-view .grid > div:first-child {
    margin-bottom: 0 !important; /* Remover margem inferior da foto */
}

#event-view aside {
    margin-top: 0 !important; /* Remover margem superior das informações */
}
