@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #15803d;
    --primary-hover: #166534;
    --bg-color: #f3f4f6;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --card-radius: 1rem;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

/* Modern Cards */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

/* Modern Buttons */
.btn {
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary, .btn-success-custom {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(21, 128, 61, 0.4);
}

.btn-primary:hover, .btn-success-custom:hover {
    background: linear-gradient(135deg, #166534 0%, #14532d 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(21, 128, 61, 0.5);
}

/* Navbar Modern */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(21, 128, 61, 0.95) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Floating Labels Fix */
.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-control {
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.1);
}

/* Utilities */
.text-success-custom {
    color: var(--primary-color) !important;
}

.bg-success-custom {
    background-color: var(--primary-color) !important;
}

/* Dashboard Widgets */
.stat-card {
    border-left: 4px solid var(--primary-color);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: rgba(21, 128, 61, 0.1);
    color: var(--primary-color);
}

/* --- Map & Fullscreen Styles (Moved from inline) --- */

#map { height: 650px; width: 100%; border-radius: 12px; }
.leaflet-popup-content { font-size: 14px; }

/* Estilo para modo tela cheia */
.fullscreen-mode {
    background-color: white !important;
    padding: 20px !important;
    display: flex;
    flex-direction: column;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
}

/* Ajuste do mapa em tela cheia (Genérico) */
.fullscreen-mode #map {
    flex-grow: 1 !important;
    height: 100% !important; /* Força 100% da altura */
    min-height: 0; /* Permite flex shrink se necessário */
}

/* Ajuste específico para relatorio.php (estrutura simples) */
.fullscreen-mode .position-relative {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.fullscreen-mode #map {
    border-radius: 8px !important;
}

/* Ajuste específico para relatorio_global.php (com sidebar) */
.fullscreen-mode .row {
    height: 100% !important;
    margin: 0 !important;
}

.fullscreen-mode .col-md-9 {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.fullscreen-mode .col-md-3 {
    display: none !important;
}

.fullscreen-mode #map {
    border-radius: 0 !important;
}

/* Estilos personalizados para o cluster */
.custom-cluster-icon {
    background: transparent !important;
    border: none !important;
}
.cluster-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    transform: translate(-40px, -20px); /* Centraliza o container no ponto */
}
.cluster-leader-label {
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 4px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid #ddd;
    text-align: center;
}
.cluster-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    border: 3px solid rgba(255,255,255,0.5);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    font-size: 14px;
}
.marker-cluster-small { background-color: rgba(110, 204, 57, 0.9)!important; }
.marker-cluster-medium { background-color: rgba(240, 194, 12, 0.9)!important; }
.marker-cluster-large { background-color: rgba(241, 128, 23, 0.9)!important; }

/* Classe para ocultar nomes dos líderes */
.hide-leader-labels .cluster-leader-label {
    display: none !important;
}
