/* Variáveis Globais */
:root {
    --primary-color: #60f63b;
    --primary-light: #93fda1;
    --primary-dark: #1dd826;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------- MAPA ---------------- */

/* Estilos do mapa */
#occurrence-map {
    z-index: 2;
}

/* Map Container */
#mapContainer {
    transition: all 0.3s ease;
}

/* Marker Animation */
.marker-icon {
    transition: transform 0.2s ease;
}

.marker-icon:hover {
    transform: scale(1.1);
}

/* Address Search */
#addressSearch {
    transition: all 0.3s ease;
}

#addressSearch:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Address Display */
#addressDisplay {
    animation: fadeIn 0.5s ease-out;
}

/* Location Confirmation */
#locationConfirmation {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pulse Animation for Location Button */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#refreshLocation:active {
    animation: pulse 0.5s ease;
}

/* Marcadores personalizados */
.custom-marker {
    position: relative;
    width: 30px;
    height: 42px;
    text-align: center;
}

.marker-pin {
    position: absolute;
    width: 30px;
    height: 30px;
    background: currentColor;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    left: 0;
    top: 0;
    margin: -15px 0 0 -15px;
    opacity: 0.8;
}

.marker-pin.green {
    color: #10B981;
}

.marker-pin.orange {
    color: #F59E0B;
}

.marker-pin.red {
    color: #EF4444;
}

.marker-pin.blue {
    color: #3B82F6;
}

.marker-pin.highlight {
    animation: pulse-marker 1.5s infinite;
    box-shadow: 0 0 0 rgba(255, 215, 0, 0.4);
    color: #FFD700;
}

.marker-icon {
    position: absolute;
    font-size: 18px;
    color: white;
    transform: rotate(45deg);
    left: 6px;
    top: 6px;
    z-index: 10;
}

.marker-icon.highlight {
    color: #FFD700;
}

/* Animação de pulse para marcador destacado */
@keyframes pulse-marker {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Estilo do popup do mapa */
.map-popup {
    min-width: 200px;
}

/* Animações de fade */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efeito de loading */
.skeleton-card,
.skeleton-item {
    position: relative;
    overflow: hidden;
}

.skeleton-card::after,
.skeleton-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Scroll personalizado */
#occurrences-list::-webkit-scrollbar {
    width: 6px;
}

#occurrences-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#occurrences-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#occurrences-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ---------------- HEADER ---------------- */

/* Header Desktop */
.desktop-header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Logo */
.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.logo-container:hover {
    transform: translateY(-2px);
}

.logo-glow {
    z-index: -1;
}

.logo-text {
    letter-spacing: 0.5px;
    transition: var(--transition);
}

/* Menu Principal */
.menu-items {
    position: relative;
}

.menu-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 0.5rem;
    overflow: hidden;
}

.menu-item:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.menu-item i {
    margin-bottom: 0.25rem;
    transition: var(--transition);
}

.menu-text {
    position: relative;
    z-index: 1;
}

.menu-underline {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: var(--transition);
    border-radius: 3px 3px 0 0;
}

.menu-item:hover .menu-underline {
    width: 80%;
}

/* Botões de Ação */
.action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--text-color);
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px) scale(1.1);
}

.pulse-icon {
    animation: pulse 2s infinite;
}

/* Animação pulse para ícones */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Badge de Notificação */
.notification-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px white;
}

/* Dropdowns */
.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 22rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 50;
}

.dropdown-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-content {
    padding: 0.5rem 0;
    max-height: 24rem;
    overflow-y: auto;
}

.dropdown-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

/* Notificações */
.notification-panel {
    width: 24rem;
}

.notification-card {
    display: flex;
    padding: 1rem 1.5rem;
    transition: var(--transition);
}

.notification-card:hover {
    background-color: #f8fafc;
    transform: translateX(5px);
}

.notification-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.notification-details {
    flex: 1;
    min-width: 0;
}

.notification-details h4 {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.notification-details p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-details time {
    color: var(--primary-color);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
}

.notification-details i {
    margin-right: 0.25rem;
    font-size: 0.625rem;
}

.view-all {
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-dark);
}

/* Perfil */
.profile-btn {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border-radius: 9999px;
    background-color: rgba(59, 130, 246, 0.1);
    transition: var(--transition);
}

.profile-btn:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

#profile-dropdown {
    z-index: 9999;
}

.avatar-wrapper {
    position: relative;
    margin-right: 0.75rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}



/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Circle Background */
.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.circles .circle {
    position: absolute;
    display: block;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: animate 25s linear infinite;
    bottom: -150px;
}

.circles .circle:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.circles .circle:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles .circle:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles .circle:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles .circle:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* Custom Components */
.btn-primary {
    background: linear-gradient(to right, #3bf64b, #25eb50);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
}

.btn-primary:hover {
    background: linear-gradient(to right, #25eb56, #1dd836);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.form-group {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Input focus effect */
input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Toggle password button */
.toggle-password {
    transition: all 0.3s ease;
}

.toggle-password:hover {
    transform: scale(1.1);
}

/* Pattern overlay */
.pattern-dots {
    background-image: radial-gradient(currentColor 1px, transparent 1px);
    background-size: 15px 15px;
}

/* Loading state */
.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-content {
    transition: opacity 0.3s ease;
}

.btn-primary.loading .btn-content {
    opacity: 0;
}

.btn-primary.loading .btn-loader {
    display: block;
}

/* Ajustes para mobile */
@media (max-width: 767px) {
    main {
        padding-top: 4rem;
        /* Espaço para o header mobile */
        padding-bottom: 6rem;
        /* Espaço para os botões */
    }

    #mapContainer {
        margin-top: 1rem;
    }

    /* Estilo para preview de mídias em mobile */
    #mediaPreviews {
        grid-template-columns: 1fr;
    }
}

/* Estilo para vídeos na pré-visualização */
video {
    background-color: #000;
}

/* Garante que o container do mapa tenha altura fixa */
#mapContainer {
    min-height: 300px;
}

/* Efeito de skeleton loading */
.skeleton-loading {
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
}

.skeleton-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Efeito de hover nos cards */
.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Transições suaves */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efeito de pulse para notificações não lidas */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.notification-pulse {
    animation: pulse 2s infinite;
}

/* Layout responsivo para gráficos */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 300px;
}

@media (max-width: 768px) {
    .chart-container {
        min-height: 250px;
    }
}

/* Melhorias para o header mobile */
@media (max-width: 767px) {
    main {
        padding-bottom: 80px;
        /* Espaço para a navegação mobile */
    }

    /* Ajuste para o botão flutuante */
    .floating-action-btn {
        width: 56px;
        height: 56px;
        position: fixed;
        bottom: 80px;
        right: 20px;
        z-index: 40;
    }
}

/* Efeito de zoom nas imagens */
.img-zoom {
    transition: transform 0.3s ease;
}

.img-zoom:hover {
    transform: scale(1.03);
}

/* Scroll personalizado */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}