body {
    background: #f8f9fa;
    font-family: system-ui, -apple-system, sans-serif;
}

.container {
    max-width: 1400px;
}

#map {
    height: 78vh;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.status-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-admin {
    background: #d1e7dd;
    color: #0f5132;
}

.status-offline {
    background: #fff3cd;
    color: #664d03;
}

.map-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.info-panel {
    margin-top: 14px;
    background: white;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #ddd;
}

.report-item {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

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

.pulse-marker {
    animation: pulseMarker 1.5s ease-out infinite;
}

/* ===== MODAL ===== */
.custom-modal-header {
    background: linear-gradient(135deg, #e8f5e9, #ffffff);
    border-bottom: 1px solid #d0e7d2;
}

.modal-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.modal-dialog {
    margin-top: 60px; /* match your header height */
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
    }

    .modal-content {
        max-height: 80vh; /* 🔥 keeps it below header */
        display: flex;
    }

    .modal-body {
        overflow-y: auto;
    }
}

@keyframes pulseMarker {

    0% {
        opacity: 1;
        stroke-width: 2;
    }

    50% {
        opacity: 0.4;
        stroke-width: 8;
    }

    100% {
        opacity: 1;
        stroke-width: 2;
    }
}

.glow-marker {
    animation: glowMarker 2s ease-out;
}

@keyframes glowMarker {

    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.report-selector {
    width: 350px;
}

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

.page-header {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.title-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    font-size: 2.0rem;
    line-height: 1;
}

.title-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.title-row h1 {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 300;
    line-height: 1;
}

@media (max-width: 768px) {
        
    .page-header {
        margin-bottom: 14px;
    }

    .title-row {
        gap: 8px;
    }

    .title-icon {
        font-size: 1.6rem;
    }

    .title-row h1 {
        font-size: 2.1rem;
        text-align: center;
    }
    
    .report-selector {
        width: calc(100vw - 40px);
        max-width: 100%;

    .map-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: calc(100% - 20px);
        margin-left: 10px;
        margin-right: 10px;
    }

    .map-controls .btn {
        width: 100%;
        margin: 0;
    }

    #notificationButton {
        grid-column: 1 / -1;
    }

    .report-selector {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
    }
}


/* Shared floating Quick Report button position.
   Override the legacy inline/config bottom offset on every deployment.
   Respect the device safe area on phones with a home indicator. */
#quickReportBtn {
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
}


/* Optional observer note field in the Quick Report panel */
#quickReportNotes {
    font-size: 0.95rem;
}


/* Live character counter and compact usage meter for Quick Report notes */
.quick-report-notes-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-top: 5px;
    font-size: 0.72rem;
    line-height: 1.2;
    color: #64748b;
}

.quick-report-notes-meter {
    width: 76px;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.12);
}

.quick-report-notes-meter > div {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #198754;
    transition: width 120ms ease, background-color 120ms ease;
}

#quickReportNotesCount.is-near-limit { color: #b7791f; }
#quickReportNotesCount.is-at-limit { color: #dc3545; font-weight: 700; }
.quick-report-notes-meter > div.is-near-limit { background: #d69e2e; }
.quick-report-notes-meter > div.is-at-limit { background: #dc3545; }
