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

:root {
    --primary: #00d4aa;
    --primary-dark: #00b894;
    --accent: #1e90ff;
    --danger: #ff4757;
    --warning: #ffa502;
    --success: #2ed573;
    --bg-dark: #0a0e17;
    --bg-card: rgba(17, 24, 39, 0.95);
    --bg-card-solid: #111827;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f8fafc;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --bottom-nav-height: 64px;
    --header-height: 56px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    -webkit-tap-highlight-color: transparent;
}

/* ===== HEADER ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    height: var(--header-height);
    background: linear-gradient(135deg, rgba(15, 31, 51, 0.97), rgba(10, 14, 23, 0.97));
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-brand-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.app-brand h1 {
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 640px) {
    .app-brand h1 {
        font-size: 12px;
    }
}

.app-brand p {
    font-size: 9.5px;
    color: var(--text-muted);
    margin-top: 1px;
}

.header-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-filter select {
    padding: 6px 28px 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-card-solid);
    color: var(--text);
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 6px center;
    background-repeat: no-repeat;
    background-size: 14px;
    max-width: 150px;
}

.header-filter select option {
    background: var(--bg-card-solid);
    color: var(--text);
    padding: 8px;
}

/* Theme toggle button */
.btn-theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.header-time {
    font-size: 9px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-time .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.3;
    }
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: linear-gradient(180deg, rgba(15, 20, 30, 0.98), rgba(10, 14, 23, 1));
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s;
    position: relative;
    text-decoration: none;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.nav-item i {
    font-size: 18px;
    transition: transform 0.25s;
}

.nav-item.active i {
    transform: translateY(-2px);
}

.nav-item.emergency {
    color: var(--danger);
}

.nav-item.emergency.active::before {
    background: var(--danger);
}

/* ===== TAB PAGES ===== */
.tab-page {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: var(--bottom-nav-height);
    display: none;
    overflow: hidden;
}

.tab-page.active {
    display: flex;
    flex-direction: column;
}

/* ===== MAP TAB ===== */
#map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.map-legend {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 800;
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 10px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.map-fab {
    position: absolute;
    bottom: 40px;
    right: 12px;
    z-index: 800;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 212, 170, 0.3);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s;
}

.map-fab:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* Satellite toggle button - posisi di atas tombol locate */
.map-fab-satellite {
    bottom: 90px;
    border-color: rgba(124, 58, 237, 0.35);
    color: #a78bfa;
}

.map-fab-satellite:hover {
    border-color: #7c3aed;
    color: #c4b5fd;
}

.map-fab-satellite.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(30, 144, 255, 0.2));
    border-color: #7c3aed;
    color: #c4b5fd;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    animation: satellitePulse 2s ease-in-out infinite;
}

@keyframes satellitePulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    }

    50% {
        box-shadow: 0 4px 28px rgba(124, 58, 237, 0.7), 0 0 40px rgba(30, 144, 255, 0.3);
    }
}

.incident-filter-bar {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    background: rgba(10, 14, 23, 0.95);
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
}

.incident-filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.filter-chip.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: rgba(0, 212, 170, 0.4);
    color: var(--primary);
}

/* ===== MAP POPUP ===== */
.leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #1f2937, #111827) !important;
    color: var(--text) !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-tip {
    background: #1f2937 !important;
}

.leaflet-popup-close-button {
    color: var(--text-muted) !important;
    font-size: 18px !important;
}

.popup-content h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.popup-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.popup-info {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.popup-info strong {
    color: var(--text);
}

/* ===== ROUTE TAB ===== */
.route-page {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.route-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.route-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-card h3 i {
    color: var(--primary);
}

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: block;
}

.input-field {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: rgba(0, 212, 170, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.vehicle-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vehicle-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.vehicle-btn.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: rgba(0, 212, 170, 0.4);
    color: var(--primary);
}

.vehicle-btn i {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.btn-primary {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.route-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.route-result:hover {
    border-color: rgba(0, 212, 170, 0.3);
}

.route-result.recommended {
    border-color: rgba(0, 212, 170, 0.4);
}

.route-result.recommended::before {
    content: '⭐ Direkomendasikan';
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.route-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.route-time {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.route-distance {
    font-size: 12px;
    color: var(--text-secondary);
}

.route-name {
    font-size: 12px;
    color: var(--text);
    margin-top: 6px;
    font-weight: 500;
}

.route-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-top: 8px;
    background: rgba(255, 165, 2, 0.1);
    border: 1px solid rgba(255, 165, 2, 0.2);
    font-size: 11px;
    color: var(--warning);
}

/* Route Search Suggestions */
.search-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-item:hover {
    background: rgba(0, 212, 170, 0.08);
}

.suggestion-item i {
    color: var(--text-muted);
    font-size: 11px;
    flex-shrink: 0;
}

.suggestion-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Route Map */
#route-map {
    background: var(--bg-dark);
}

/* Route Results */
.route-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.route-result.recommended {
    border-color: rgba(0, 212, 170, 0.3);
    background: rgba(0, 212, 170, 0.04);
}

.route-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
}

.route-time {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.route-distance {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.route-name {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.route-warning {
    font-size: 11px;
    color: #ffa502;
    background: rgba(255, 165, 2, 0.08);
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Navigation Action Buttons */
.route-nav-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-nav-gmaps {
    background: rgba(52, 168, 83, 0.12);
    color: #34a853;
    border: 1px solid rgba(52, 168, 83, 0.25);
}

.btn-nav-gmaps:hover {
    background: rgba(52, 168, 83, 0.25);
}

.btn-nav-waze {
    background: rgba(51, 204, 255, 0.1);
    color: #33ccff;
    border: 1px solid rgba(51, 204, 255, 0.2);
}

.btn-nav-waze:hover {
    background: rgba(51, 204, 255, 0.2);
}

.input-group {
    position: relative;
}

/* ===== CCTV TAB ===== */
.cctv-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.cctv-search {
    padding: 10px 12px;
    background: rgba(10, 14, 23, 0.95);
    border-bottom: 1px solid var(--border);
}

.cctv-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 12px;
}

.cctv-search-box i {
    color: var(--text-muted);
    font-size: 13px;
}

.cctv-search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.cctv-search-box input::placeholder {
    color: var(--text-muted);
}

.cctv-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.cctv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.cctv-item:hover,
.cctv-item.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 212, 170, 0.2);
}

.cctv-thumb {
    width: 56px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow: hidden;
}

.cctv-info {
    flex: 1;
    min-width: 0;
}

.cctv-info h4 {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cctv-info p {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cctv-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cctv-status.online {
    background: var(--success);
}

.cctv-status.offline {
    background: var(--danger);
}

/* CCTV Region Filter */
.cctv-region-filter {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
}

.cctv-region-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.cctv-region-btn.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: rgba(0, 212, 170, 0.4);
    color: var(--primary);
}

/* CCTV Region Badge */
.cctv-region-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    margin-left: 4px;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.cctv-attribution {
    padding: 14px 16px;
    margin: 4px 12px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    flex-shrink: 0;
}

.cctv-attribution p {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.8;
}

.cctv-attribution p i {
    color: var(--primary);
    font-size: 10px;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.cctv-attribution p strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.cctv-attribution a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.cctv-attribution a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* CCTV Player Modal */
.cctv-player-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
}

.cctv-player-modal.active {
    display: flex;
}

.cctv-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(17, 24, 39, 0.9);
    border-bottom: 1px solid var(--border);
}

.cctv-player-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.cctv-player-close {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    box-shadow: 0 0 12px rgba(255, 71, 87, 0.15);
}

.cctv-player-close:hover {
    background: rgba(255, 71, 87, 0.4);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.3);
    transform: scale(1.05);
}

.cctv-player-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.cctv-player-back-btn:hover {
    background: rgba(0, 212, 170, 0.15);
    border-color: rgba(0, 212, 170, 0.4);
    color: var(--primary);
}

.cctv-player-back-btn i {
    font-size: 13px;
}

.cctv-player-video {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

.cctv-player-video video {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cctv-player-info {
    padding: 14px 16px;
    background: rgba(17, 24, 39, 0.9);
    border-top: 1px solid var(--border);
}

.cctv-player-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.cctv-player-info .live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.cctv-player-info .live-badge i {
    font-size: 8px;
    animation: blink 1s infinite;
}

/* ===== REPORT TAB ===== */
.report-page {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.report-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-card h3 i {
    color: var(--warning);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-btn {
    padding: 12px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.category-btn.active {
    background: rgba(0, 212, 170, 0.12);
    border-color: rgba(0, 212, 170, 0.4);
    color: var(--primary);
}

.category-btn .cat-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
}

.photo-upload {
    width: 100%;
    padding: 24px;
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.photo-upload:hover {
    border-color: rgba(0, 212, 170, 0.3);
    background: rgba(0, 212, 170, 0.03);
}

.photo-upload i {
    font-size: 28px;
    display: block;
    margin-bottom: 6px;
}

.photo-upload span {
    font-size: 12px;
    font-weight: 500;
}

.photo-preview {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 8px;
    display: none;
}

.report-success {
    text-align: center;
    padding: 30px 20px;
    display: none;
}

.report-success i {
    font-size: 48px;
    color: var(--success);
    margin-bottom: 12px;
}

.report-success h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.report-success p {
    font-size: 13px;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-diterima {
    background: rgba(30, 144, 255, 0.15);
    color: var(--accent);
}

.status-diproses {
    background: rgba(255, 165, 2, 0.15);
    color: var(--warning);
}

.status-selesai {
    background: rgba(46, 213, 115, 0.15);
    color: var(--success);
}

/* ===== EMERGENCY TAB ===== */
.emergency-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(255, 71, 87, 0.05), transparent 70%);
}

.emergency-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.1);
    border: 2px solid rgba(255, 71, 87, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    animation: emergency-pulse 2s infinite;
}

@keyframes emergency-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.3);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(255, 71, 87, 0);
    }
}

.emergency-page h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.emergency-page .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.emergency-btn {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 8px 40px rgba(255, 71, 87, 0.4);
    transition: all 0.3s;
    margin-bottom: 24px;
    animation: btn-breathe 3s ease-in-out infinite;
}

@keyframes btn-breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

.emergency-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 50px rgba(255, 71, 87, 0.5);
}

.emergency-btn:active {
    transform: scale(0.97);
}

.emergency-btn i {
    font-size: 36px;
}

.emergency-btn span {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.emergency-info {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 280px;
}

.emergency-info i {
    color: var(--primary);
    margin-right: 4px;
}

/* Emergency Confirm Modal */
.emergency-confirm {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.emergency-confirm.active {
    display: flex;
}

.emergency-confirm-box {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.emergency-confirm-box h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.emergency-confirm-box p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.confirm-actions {
    display: flex;
    gap: 10px;
}

.confirm-actions button {
    flex: 1;
    padding: 13px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.btn-confirm-call {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
}

.btn-confirm-cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border) !important;
    color: var(--text);
}

/* ===== LOADING SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 5000;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: rgba(46, 213, 115, 0.3);
}

.toast.success i {
    color: var(--success);
}

.toast.error {
    border-color: rgba(255, 71, 87, 0.3);
}

.toast.error i {
    color: var(--danger);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

/* Marker */
.marker-cluster-small {
    background: rgba(0, 212, 170, 0.3) !important;
}

.marker-cluster-small div {
    background: rgba(0, 212, 170, 0.7) !important;
    color: white !important;
}

.marker-cluster-medium {
    background: rgba(255, 165, 2, 0.3) !important;
}

.marker-cluster-medium div {
    background: rgba(255, 165, 2, 0.7) !important;
    color: white !important;
}

.marker-cluster-large {
    background: rgba(255, 71, 87, 0.3) !important;
}

.marker-cluster-large div {
    background: rgba(255, 71, 87, 0.7) !important;
    color: white !important;
}

/* ===== LIGHT MODE ===== */
[data-theme='light'] {
    --bg-dark: #f0f2f5;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-solid: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --text: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --primary: #00b894;
    --primary-dark: #00a381;
    --accent: #0984e3;
}

[data-theme='light'] .app-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(245, 247, 250, 0.97));
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .app-brand h1 {
    background: linear-gradient(135deg, #00b894, #0984e3);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme='light'] .bottom-nav {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 1));
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .incident-filter-bar {
    background: rgba(245, 247, 250, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .filter-chip {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
}

[data-theme='light'] .filter-chip.active {
    background: rgba(0, 184, 148, 0.12);
    border-color: rgba(0, 184, 148, 0.3);
    color: var(--primary);
}

[data-theme='light'] .map-legend {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .map-fab {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 184, 148, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme='light'] .route-card,
[data-theme='light'] .report-card,
[data-theme='light'] .route-result {
    background: var(--bg-card);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .input-field {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
    color: var(--text);
}

[data-theme='light'] .input-field::placeholder {
    color: #a0aec0;
}

[data-theme='light'] .vehicle-btn,
[data-theme='light'] .category-btn {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-secondary);
}

[data-theme='light'] .vehicle-btn.active,
[data-theme='light'] .category-btn.active {
    background: rgba(0, 184, 148, 0.1);
    border-color: rgba(0, 184, 148, 0.3);
    color: var(--primary);
}

[data-theme='light'] .cctv-search {
    background: rgba(245, 247, 250, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .cctv-search-box {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme='light'] .cctv-search-box input {
    color: var(--text);
}

[data-theme='light'] .cctv-search-box input::placeholder {
    color: #a0aec0;
}

[data-theme='light'] .cctv-item:hover,
[data-theme='light'] .cctv-item.active {
    background: rgba(0, 184, 148, 0.04);
    border-color: rgba(0, 184, 148, 0.15);
}

[data-theme='light'] .cctv-thumb {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme='light'] .photo-upload {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-muted);
}

[data-theme='light'] .toast {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    color: var(--text);
}

[data-theme='light'] .emergency-confirm-box {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .btn-confirm-cancel {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--text);
}

[data-theme='light'] .search-suggestions {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

[data-theme='light'] .suggestion-item {
    color: var(--text);
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

[data-theme='light'] .suggestion-item:hover {
    background: rgba(0, 184, 148, 0.06);
}

[data-theme='light'] .leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #fff, #f8f9fa) !important;
    color: var(--text) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
}

[data-theme='light'] .leaflet-popup-tip {
    background: #fff !important;
}

[data-theme='light'] .popup-info {
    color: var(--text-secondary);
}

[data-theme='light'] .popup-info strong {
    color: var(--text);
}

[data-theme='light'] .btn-theme-toggle {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
}

[data-theme='light'] .btn-theme-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text);
}

[data-theme='light'] .header-filter select {
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

[data-theme='light'] .header-filter select option {
    background: #fff;
    color: #1a1a2e;
}

[data-theme='light'] .nav-item {
    color: #a0aec0;
}

[data-theme='light'] .nav-item.active {
    color: var(--primary);
}

[data-theme='light'] .nav-item.emergency {
    color: var(--danger);
}

[data-theme='light'] .emergency-page {
    background: radial-gradient(circle at center, rgba(255, 71, 87, 0.03), transparent 70%);
}

/* ===== SPLASH SCREEN ===== */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #080c14;
    overflow: hidden;
    padding: 0 0 env(safe-area-inset-bottom, 0);
}

/* Animated background blobs */
.splash-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.splash-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    animation: blobFloat 8s ease-in-out infinite alternate;
}

.splash-blob-1 {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, #00d4aa, transparent 70%);
    top: -80px;
    left: -60px;
    animation-delay: 0s;
}

.splash-blob-2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #1e90ff, transparent 70%);
    bottom: 100px;
    right: -60px;
    animation-delay: -3s;
}

.splash-blob-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes blobFloat {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.15) translate(20px, 20px);
    }
}

/* Logo top area */
.splash-logo-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: max(52px, env(safe-area-inset-top, 52px));
    padding-bottom: 8px;
    animation: splashLogoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes splashLogoIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.85);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.splash-logo-ring {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    padding: 3px;
    background: linear-gradient(135deg, #00d4aa, #1e90ff, #7c3aed);
    box-shadow: 0 0 24px rgba(0, 212, 170, 0.4);
    animation: ringPulse 2.5s ease-in-out infinite;
}

@keyframes ringPulse {

    0%,
    100% {
        box-shadow: 0 0 24px rgba(0, 212, 170, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 212, 170, 0.7), 0 0 60px rgba(30, 144, 255, 0.3);
    }
}

.splash-logo-img {
    width: 100%;
    height: 100%;
    border-radius: 13px;
    object-fit: cover;
    display: block;
}

.splash-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.splash-brand-name {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4aa, #1e90ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.04em;
}

.splash-brand-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Slides wrapper */
.splash-slides-wrapper {
    position: relative;
    z-index: 2;
    flex: 1;
    width: 100%;
    max-width: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    overflow: hidden;
}

.splash-slide {
    position: absolute;
    width: calc(100% - 56px);
    text-align: center;
    opacity: 0;
    transform: translateY(32px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.splash-slide.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.splash-slide.exit {
    opacity: 0;
    transform: translateY(-28px) scale(0.96);
}

.splash-slide-icon {
    font-size: 64px;
    margin-bottom: 20px;
    line-height: 1;
    filter: drop-shadow(0 8px 24px rgba(0, 212, 170, 0.25));
    animation: iconBounce 3s ease-in-out infinite;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.splash-slide-title {
    font-size: 22px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.splash-slide-desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.7;
    margin-bottom: 24px;
    font-weight: 400;
}

.splash-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 20px;
    text-align: left;
}

.splash-feat {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    display: flex;
    align-items: center;
    gap: 10px;
}

.splash-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4aa, #1e90ff);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.4);
}

/* Dot indicators */
.splash-dots {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.splash-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-dot.active {
    width: 28px;
    background: linear-gradient(90deg, #00d4aa, #1e90ff);
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.5);
}

/* CTA buttons */
.splash-cta-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    padding: 0 28px;
    padding-bottom: max(28px, env(safe-area-inset-bottom, 28px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.splash-btn-next,
.splash-btn-enter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 20px;
    border-radius: 14px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-btn-next {
    background: linear-gradient(135deg, #00d4aa, #1e90ff);
    color: #fff;
    box-shadow: 0 6px 24px rgba(0, 212, 170, 0.35);
}

.splash-btn-next:hover,
.splash-btn-next:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 32px rgba(0, 212, 170, 0.5);
}

.splash-btn-enter {
    background: linear-gradient(135deg, #1e90ff, #7c3aed);
    color: #fff;
    box-shadow: 0 6px 24px rgba(30, 144, 255, 0.35);
}

.splash-btn-enter:hover,
.splash-btn-enter:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 32px rgba(30, 144, 255, 0.5);
}

.splash-btn-skip {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.38);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s;
    text-align: center;
}

.splash-btn-skip:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Fade-out animation when closing */
.splash-fade-out {
    animation: splashFadeOut 0.6s ease forwards;
}

/* ===== SPLASH INTRO (Logo full-screen sebelum slide) ===== */
.splash-intro {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    animation: splashIntroIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

@keyframes splashIntroIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.splash-intro-exit {
    opacity: 0 !important;
    transform: scale(1.05) !important;
}

/* Logo besar di intro */
.splash-intro-ring {
    width: 130px;
    height: 130px;
    border-radius: 32px;
    padding: 4px;
    background: linear-gradient(135deg, #00d4aa, #1e90ff, #7c3aed);
    box-shadow:
        0 0 0 0 rgba(0, 212, 170, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.5);
    animation: introRingPulse 2s ease-in-out infinite,
        introRingGrow 0.8s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes introRingPulse {

    0%,
    100% {
        box-shadow: 0 0 32px rgba(0, 212, 170, 0.4), 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 60px rgba(0, 212, 170, 0.7), 0 0 90px rgba(30, 144, 255, 0.35), 0 20px 60px rgba(0, 0, 0, 0.5);
    }
}

@keyframes introRingGrow {
    from {
        transform: scale(0.6) rotate(-10deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.splash-intro-img {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    object-fit: cover;
    display: block;
}

/* Brand text di intro */
.splash-intro-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    animation: splashIntroTextIn 0.6s 0.5s ease both;
}

@keyframes splashIntroTextIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.splash-intro-brand .splash-brand-name {
    font-size: 28px;
    letter-spacing: 0.06em;
}

.splash-intro-brand .splash-brand-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Tagline kecil */
.splash-intro-tagline {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: splashIntroTextIn 0.6s 0.8s ease both;
}

/* Loading dots bawah intro */
.splash-intro-tagline::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #00d4aa, #1e90ff);
    border-radius: 2px;
    margin-top: 16px;
    display: block;
    margin: 16px auto 0;
    animation: introLine 1.8s ease-in-out infinite;
}

@keyframes introLine {

    0%,
    100% {
        opacity: 0.3;
        transform: scaleX(1);
    }

    50% {
        opacity: 1;
        transform: scaleX(1.4);
    }
}

/* ===== PWA INSTALL BANNER ===== */
.pwa-banner {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(0, 180, 148, 0.96), rgba(30, 144, 255, 0.96));
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.pwa-banner-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.pwa-banner-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pwa-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.pwa-banner-text strong {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-text span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pwa-banner-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: #fff;
}

.pwa-banner-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.2s;
}

.pwa-banner-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ===== PWA INSTALL FAB ===== */
.map-fab-install {
    bottom: 175px;
    border-color: rgba(0, 212, 170, 0.5);
    color: #00d4aa;
    background: rgba(0, 212, 170, 0.12);
}

.map-fab-install:hover {
    border-color: var(--primary);
    background: rgba(0, 212, 170, 0.2);
}

/* Bounce animation when install prompt first appears */
.pwa-bounce {
    animation: pwaBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pwaBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== VISI BUTTON (filter bar) ===== */
.filter-chip-visi {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(30, 144, 255, 0.15)) !important;
    border-color: rgba(0, 212, 170, 0.5) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.filter-chip-visi::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(30, 144, 255, 0.1));
    opacity: 0;
    transition: opacity 0.2s;
}

.filter-chip-visi:hover::before {
    opacity: 1;
}

/* ===== VISI MODAL OVERLAY ===== */
.visi-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.visi-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal card */
.visi-modal {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 88vh;
    overflow-y: auto;
    background: linear-gradient(160deg, #0f1e33 0%, #0a0e17 60%, #0d1a2a 100%);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 24px;
    padding: 28px 24px 24px;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: none;
}

.visi-modal::-webkit-scrollbar {
    display: none;
}

.visi-overlay.active .visi-modal {
    transform: translateY(0) scale(1);
}

/* Close button */
.visi-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.visi-close:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
}

/* Logo */
.visi-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.visi-logo-ring {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    padding: 3px;
    background: linear-gradient(135deg, #00d4aa, #1e90ff, #7c3aed);
    box-shadow: 0 8px 32px rgba(0, 212, 170, 0.35);
    animation: visiLogoGlow 3s ease-in-out infinite;
}

@keyframes visiLogoGlow {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(0, 212, 170, 0.35);
    }

    50% {
        box-shadow: 0 8px 48px rgba(0, 212, 170, 0.6), 0 0 60px rgba(30, 144, 255, 0.25);
    }
}

.visi-logo-ring img {
    width: 100%;
    height: 100%;
    border-radius: 19px;
    object-fit: cover;
    display: block;
}

/* Title */
.visi-title-wrap {
    text-align: center;
    margin-bottom: 18px;
}

.visi-title {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4aa, #1e90ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.visi-divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #00d4aa, #1e90ff);
    border-radius: 2px;
    margin: 0 auto;
}

/* Acronym grid */
.visi-acronym {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.visi-acronym-row {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.visi-letter {
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4aa, #1e90ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    min-width: 40px;
    flex-shrink: 0;
    line-height: 1.4;
}

.visi-word {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

/* Description */
.visi-desc {
    margin-bottom: 16px;
}

.visi-desc p {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 12px;
    text-align: center;
}

.visi-desc p strong {
    color: #fff;
}

.visi-desc p em {
    color: var(--primary);
    font-style: normal;
    font-weight: 600;
}

.visi-tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(30, 144, 255, 0.1));
    border: 1px solid rgba(0, 212, 170, 0.2);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.5;
}

.visi-tagline i {
    color: var(--primary);
    font-size: 15px;
    flex-shrink: 0;
}

.visi-tagline strong {
    color: var(--primary);
}

/* Footer */
.visi-footer {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.visi-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

.visi-badge i {
    color: var(--primary);
    font-size: 12px;
}

/* ===== MAP SEARCH BAR ===== */
.map-search-wrap {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 900;
    max-width: 420px;
    margin: 0 auto;
    right: auto;
    width: calc(100% - 20px);
}

.map-search-box {
    display: flex;
    align-items: center;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0 12px;
    height: 46px;
    gap: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.map-search-box:focus-within {
    border-color: rgba(0, 212, 170, 0.5);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(0, 212, 170, 0.12);
}

.map-search-icon {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
    transition: color 0.25s;
}

.map-search-box:focus-within .map-search-icon {
    color: var(--primary);
}

.map-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    min-width: 0;
}

.map-search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.map-search-clear {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
}

.map-search-clear:hover {
    background: rgba(255, 71, 87, 0.25);
    color: #ff4757;
}

/* Suggestions dropdown */
.map-search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: none;
    display: none;
    animation: searchDropIn 0.2s ease both;
}

.map-search-suggestions::-webkit-scrollbar {
    display: none;
}

@keyframes searchDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-search-suggestions.visible {
    display: block;
}

.map-search-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

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

.map-search-item:hover,
.map-search-item:focus {
    background: rgba(0, 212, 170, 0.08);
}

.map-search-item-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(0, 212, 170, 0.12);
    border: 1px solid rgba(0, 212, 170, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--primary);
    margin-top: 1px;
}

.map-search-item-text {
    flex: 1;
    min-width: 0;
}

.map-search-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.map-search-item-addr {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading & empty states */
.map-search-loading,
.map-search-empty {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.map-search-loading i {
    color: var(--primary);
    animation: fa-spin 1s linear infinite;
}

/* Search result pin marker */
.map-search-pin {
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 3px solid white;
    transform: rotate(-45deg);
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-search-pin i {
    transform: rotate(45deg);
    color: white;
    font-size: 13px;
}

/* Light theme overrides */
[data-theme='light'] .map-search-box {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme='light'] .map-search-input {
    color: #1f2937;
}

[data-theme='light'] .map-search-input::placeholder {
    color: #9ca3af;
}

[data-theme='light'] .map-search-suggestions {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme='light'] .map-search-item-name {
    color: #1f2937;
}

/* ===== TRAFFIC STATS PANEL ===== */
.traffic-stats-panel {
    position: absolute;
    left: 10px;
    bottom: 28px;
    z-index: 800;
    background: rgba(8, 12, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 71, 87, 0.25);
    border-radius: 14px;
    padding: 10px 13px;
    min-width: 170px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
    animation: statsSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes statsSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.traffic-stats-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 0;
}

.traffic-stat-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.traffic-stats-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.traffic-stats-val {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.traffic-stats-label {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.traffic-stats-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}

.traffic-stats-update {
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.traffic-stats-update::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
    animation: statsDot 2s ease-in-out infinite;
}

@keyframes statsDot {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ===== TRAFFIC STATS FAB + TOOLTIP ===== */
.traffic-fab-wrap {
    position: absolute;
    left: 10px;
    bottom: 110px;
    /* just above map-legend */
    z-index: 850;
}

/* The FAB button (red arrow icon) */
.traffic-fab-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 71, 87, 0.45);
    background: rgba(8, 12, 20, 0.9);
    backdrop-filter: blur(12px);
    color: #ff4757;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.25s;
    position: relative;
}

.traffic-fab-btn:hover {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.7);
    transform: scale(1.08);
}

.traffic-fab-btn.active {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.35);
}

/* Pulse ring when data is loaded */
.traffic-fab-btn::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 13px;
    border: 2px solid rgba(255, 71, 87, 0.35);
    animation: trafficFabPulse 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes trafficFabPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0;
        transform: scale(1.3);
    }
}

/* Tooltip popup */
.traffic-tooltip {
    position: absolute;
    left: 44px;
    bottom: 0;
    width: 210px;
    background: rgba(8, 12, 20, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: 14px;
    padding: 12px 14px 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-8px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.traffic-tooltip.open {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.traffic-tooltip-header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.traffic-tooltip-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.traffic-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tt-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.tt-val {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.traffic-tooltip-footer {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.3);
}

.tt-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
    flex-shrink: 0;
    animation: ttDotPulse 2s ease-in-out infinite;
}

@keyframes ttDotPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ===== MEASURE TOOL ===== */

/* Measure FAB — positioned above satellite button */
.map-fab-measure {
    bottom: 135px;
    border-color: rgba(0, 212, 170, 0.35);
    color: var(--primary);
}

.map-fab-measure:hover {
    border-color: var(--primary);
    background: rgba(0, 212, 170, 0.1);
}

.map-fab-measure.active {
    background: rgba(0, 212, 170, 0.2);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
}

/* Crosshair cursor when in measure mode */
#map-container.measure-mode {
    cursor: crosshair !important;
}

#map-container.measure-mode .leaflet-container {
    cursor: crosshair !important;
}

/* Hint bar at bottom center */
.measure-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(8, 12, 20, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 212, 170, 0.35);
    border-radius: 30px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    animation: hintPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes hintPop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.measure-cancel {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 71, 87, 0.4);
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.measure-cancel:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
}

/* Result panel — slides up from bottom */
.measure-result {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 901;
    background: rgba(8, 12, 20, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(0, 212, 170, 0.25);
    border-radius: 20px 20px 0 0;
    padding: 16px 16px 24px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    animation: resultSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes resultSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.measure-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 14px;
}

.measure-result-header span {
    flex: 1;
}

.measure-result-close {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
}

.measure-result-close:hover {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border-color: rgba(255, 71, 87, 0.4);
}

.measure-result-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.measure-result-row {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mr-label {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.mr-val {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.measure-result-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
}

/* Measure marker pins */
.measure-marker-a,
.measure-marker-b {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.measure-marker-a {
    background: #00d4aa;
}

.measure-marker-b {
    background: #1e90ff;
}

.measure-marker-a span,
.measure-marker-b span {
    transform: rotate(45deg);
    color: white;
}