/* ==========================================================================
   LEONIDA ATLAS AI — GTA VI Interactive Map Stylesheet
   Vice City Neon Sunset & Tactical Glassmorphism
   ========================================================================== */

:root {
    --bg-deep: #070710;
    --bg-panel: rgba(13, 13, 27, 0.88);
    --bg-panel-solid: #0f1022;
    --bg-card: rgba(24, 24, 48, 0.72);
    --bg-card-hover: rgba(34, 34, 66, 0.9);
    --border: rgba(255, 255, 255, 0.09);
    --border-bright: rgba(0, 240, 255, 0.35);

    --vice-pink: #ff2e93;
    --vice-cyan: #00f0ff;
    --vice-amber: #ffb800;
    --vice-purple: #a855f7;
    --vice-emerald: #10b981;
    --vice-danger: #ef4444;

    --text-main: #f3f4ff;
    --text-muted: #98a2c4;
    --text-dim: #646e91;

    --grad-vice: linear-gradient(135deg, #ff2e93 0%, #ffb800 52%, #00f0ff 100%);
    --grad-pink-cyan: linear-gradient(135deg, #ff2e93, #a855f7, #00f0ff);
    --shadow-panel: 0 18px 50px rgba(0, 0, 0, 0.65);

    --topbar-h: 64px;
    --radius: 14px;
    --radius-sm: 9px;
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* Scrollbar elegante */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, 0.45); }

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    background: rgba(8, 8, 20, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

.topbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--grad-vice);
    opacity: 0.65;
}

.topbar-left, .topbar-center, .topbar-right {
    display: flex;
    align-items: center;
    gap: 7px;
}
.topbar-left, .topbar-right {
    flex-shrink: 0;
}

.topbar-center {
    flex: 1;
    min-width: 0;
    max-width: 680px;
    justify-content: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    white-space: nowrap;
}

.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--grad-vice);
    color: #090812;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 19px;
    display: grid;
    place-items: center;
    letter-spacing: -0.5px;
    box-shadow: 0 0 22px rgba(255, 46, 147, 0.45);
    flex-shrink: 0;
}

.brand-text h1 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0.8px;
    font-weight: 700;
    white-space: nowrap;
}

.brand-text h1 span {
    background: var(--grad-vice);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text p {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}

/* Search Box */
.search-wrap {
    position: relative;
    flex: 1;
    min-width: 140px;
    max-width: 340px;
}

.search-wrap input {
    width: 100%;
    height: 38px;
    padding: 0 56px 0 36px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: rgba(20, 20, 42, 0.85);
    color: var(--text-main);
    font-family: inherit;
    font-size: 13.5px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap input:focus {
    outline: none;
    border-color: var(--vice-cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.14);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 32px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted);
    font-size: 18px; cursor: pointer;
    line-height: 1; padding: 2px 5px;
}
.search-clear:hover { color: #fff; }

.search-kbd {
    position: absolute;
    right: 11px; top: 50%;
    transform: translateY(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 5px;
}

/* Map Style Switcher */
.map-style-switcher {
    display: flex;
    background: rgba(18, 18, 38, 0.85);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 3px;
    gap: 2px;
}

.style-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 11px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.style-btn:hover { color: #fff; }
.style-btn.active {
    background: rgba(255, 46, 147, 0.22);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 46, 147, 0.55);
}

/* Buttons */
.icon-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(20, 20, 42, 0.8);
    color: var(--text-main);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 16px;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover {
    border-color: var(--vice-cyan);
    background: rgba(0, 240, 255, 0.12);
}
.icon-btn.sm { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; }

.progress-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 12px 4px 6px;
    border-radius: 99px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.1);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
.progress-pill:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--vice-emerald);
    transform: translateY(-1px);
}
.progress-ring-mini {
    min-width: 34px; height: 28px;
    padding: 0 6px;
    border-radius: 99px;
    background: var(--vice-emerald);
    color: #04130c;
    font-weight: 800;
    font-size: 11px;
    display: grid;
    place-items: center;
}
.progress-pill-text strong { display: block; font-size: 12px; line-height: 1.1; }
.progress-pill-text small { display: block; font-size: 10px; color: #86efac; }

.action-btn {
    height: 38px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(24, 24, 48, 0.85);
    color: var(--text-main);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}
.action-btn svg { width: 15px; height: 15px; }
.action-btn:hover { border-color: var(--vice-cyan); background: rgba(0, 240, 255, 0.12); }
.action-btn.active-mode {
    border-color: var(--vice-amber);
    background: rgba(255, 184, 0, 0.22);
    color: #fff;
}

.ai-btn {
    border-color: rgba(255, 46, 147, 0.55);
    background: linear-gradient(135deg, rgba(255, 46, 147, 0.28), rgba(0, 240, 255, 0.2));
    box-shadow: 0 0 20px rgba(255, 46, 147, 0.25);
}
.ai-btn:hover, .ai-btn.active {
    border-color: var(--vice-cyan);
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
}
.ai-pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--vice-cyan);
    box-shadow: 0 0 10px var(--vice-cyan);
    animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.45); opacity: 0.6; }
}

/* ==========================================================================
   WORKSPACE & LAYOUT
   ========================================================================== */
.workspace {
    position: fixed;
    top: var(--topbar-h);
    left: 0; right: 0; bottom: 0;
    display: flex;
    overflow: hidden;
}

/* SIDEBAR ESQUERDA */
.sidebar {
    width: 344px;
    flex-shrink: 0;
    height: 100%;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    z-index: 900;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease, transform 0.25s ease;
}

.sidebar.collapsed {
    margin-left: -344px;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-section {
    background: rgba(18, 18, 38, 0.55);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.section-head h3 {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--text-muted);
    font-weight: 700;
}
.head-actions { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); }
.link-btn {
    background: none; border: none;
    color: var(--vice-cyan);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* Status Pills */
.status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pill {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.15s;
}
.pill:hover { color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.pill.active {
    background: rgba(0, 240, 255, 0.18);
    border-color: var(--vice-cyan);
    color: #fff;
}
.pill.danger.active {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--vice-danger);
    color: #fecaca;
}

/* Grid fields */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.field label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}
.field select, .field input, .field textarea {
    width: 100%;
    background: rgba(10, 10, 24, 0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 12.5px;
    padding: 7px 10px;
}
.field select:focus, .field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--vice-cyan);
}

/* Region Chips */
.region-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.region-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.16s;
}
.region-chip .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}
.region-chip:hover { border-color: rgba(255, 255, 255, 0.35); transform: translateY(-1px); }
.region-chip.active {
    background: rgba(255, 46, 147, 0.2);
    border-color: var(--vice-pink);
    box-shadow: 0 0 12px rgba(255, 46, 147, 0.25);
}

/* Categories List (v8 Collapsible Groups — GTABase Style) */
.cat-preset-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 9px;
}
.cat-preset-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    padding: 7px 8px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cat-preset-btn:hover {
    border-color: rgba(0, 240, 255, 0.45);
    color: #fff;
    background: rgba(0, 240, 255, 0.1);
}
.cat-preset-btn.active {
    background: linear-gradient(135deg, rgba(255, 46, 147, 0.24), rgba(0, 240, 255, 0.22));
    border-color: var(--vice-cyan);
    color: #fff;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.18);
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cat-group {
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
    transition: border-color 0.16s ease;
}
.cat-group:hover {
    border-color: rgba(255, 255, 255, 0.16);
}
.cat-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 8px;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.cat-group-head:hover {
    background: rgba(0, 240, 255, 0.09);
}
.cat-group-title {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 11.5px;
    color: #f1f5f9;
}
.cat-group-title strong {
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cat-group-chevron {
    width: 12px;
    text-align: center;
    font-size: 11px;
    color: var(--vice-cyan);
    flex-shrink: 0;
}
.cat-group-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.cat-group-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.42);
    padding: 2px 6px;
    border-radius: 99px;
}
.cat-group-eye {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 11px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.14s ease;
}
.cat-group-eye.all-on {
    border-color: rgba(0, 240, 255, 0.45);
    background: rgba(0, 240, 255, 0.14);
    color: #a5f3fc;
}
.cat-group-eye.part-on {
    border-color: rgba(250, 204, 21, 0.45);
    background: rgba(250, 204, 21, 0.14);
    color: #fde68a;
}
.cat-group-eye.all-off {
    opacity: 0.48;
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}
.cat-group-eye:hover {
    transform: scale(1.08);
    border-color: var(--vice-cyan);
    color: #fff;
}
.cat-group-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px 6px 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.cat-group.is-collapsed .cat-group-body {
    display: none;
}

.cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 7px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.cat-row:hover { background: rgba(255, 255, 255, 0.075); }
.cat-row.active {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.13);
}
.cat-row.inactive { opacity: 0.38; }
.cat-row.empty-in-chapter { opacity: 0.28; }

.cat-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.cat-icon-box {
    width: 25px; height: 25px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cat-icon-box svg { width: 14px; height: 14px; }
.cat-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cat-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.38);
    padding: 2px 6px;
    border-radius: 99px;
    flex-shrink: 0;
}

/* Layer Toggles */
.layer-toggles { display: flex; flex-direction: column; gap: 7px; }
.toggle-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: var(--text-main);
    cursor: pointer;
}
.toggle-row input { accent-color: var(--vice-cyan); width: 15px; height: 15px; }

/* Results List */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 290px;
    overflow-y: auto;
}
.result-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}
.result-item:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
}
.result-item.is-found { opacity: 0.55; }
.result-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.result-meta { min-width: 0; flex: 1; }
.result-meta strong {
    display: block;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.result-meta small {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
}

/* ==========================================================================
   MAP STAGE & LEAFLET CUSTOMIZATION
   ========================================================================== */
.map-stage {
    position: relative;
    flex: 1;
    height: 100%;
    background: #2f90b0;
}

.map-canvas {
    width: 100%;
    height: 100%;
    background: #2f90b0;
}
.map-canvas.mode-gta-atlas { background: #2f90b0; }
.map-canvas.mode-vice-neon { background: #0b182c; }
.map-canvas.mode-tactical  { background: #08141f; }
.map-canvas.mode-satellite { background: #1e6c88; }

/* Official 16K GTA VI Tiles visual style modes */
.map-canvas .gta6-official-tiles {
    transition: filter 0.28s ease;
}
.map-canvas.mode-gta-atlas .gta6-official-tiles {
    filter: none;
}
.map-canvas.mode-vice-neon .gta6-official-tiles {
    filter: brightness(0.60) contrast(1.30) saturate(1.65) hue-rotate(-22deg);
}
.map-canvas.mode-tactical .gta6-official-tiles {
    filter: grayscale(0.84) brightness(0.46) contrast(1.42) hue-rotate(165deg);
}
.map-canvas.mode-satellite .gta6-official-tiles {
    filter: contrast(1.16) saturate(1.26) brightness(0.92);
}

/* CC BY 4.0 Attribution Pill */
.map-credit-pill {
    position: absolute;
    right: 54px;
    bottom: 14px;
    z-index: 440;
    font-size: 10.5px;
    color: rgba(226, 232, 240, 0.85);
    background: rgba(10, 14, 28, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 99px;
    padding: 3px 10px;
    backdrop-filter: blur(6px);
    pointer-events: auto;
}
.map-credit-pill a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
}
.map-credit-pill a:hover {
    text-decoration: underline;
}

/* Floating Map Style Switcher (shown whenever topbar switcher is hidden at <= 1180px) */
.floating-style-switcher {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 460;
    background: rgba(12, 16, 34, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 99px;
    padding: 3px;
    gap: 2px;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.floating-style-switcher .style-btn {
    padding: 5px 9px;
    font-size: 11px;
    border-radius: 99px;
}

/* Map Visual Modes */
.map-canvas .leaflet-image-layer {
    image-rendering: high-quality;
    will-change: transform;
}
.map-canvas.mode-satellite .leaflet-image-layer {
    filter: contrast(1.06) saturate(1.12);
    transition: filter 0.35s ease;
}
.map-canvas.mode-atlas .leaflet-image-layer {
    filter: saturate(0.32) contrast(1.26) brightness(0.95) hue-rotate(-8deg);
    transition: filter 0.35s ease;
}
.map-canvas.mode-vice-neon .leaflet-image-layer {
    filter: saturate(1.55) hue-rotate(-18deg) brightness(0.66) contrast(1.24);
    transition: filter 0.35s ease;
}
.map-canvas.mode-tactical .leaflet-image-layer {
    filter: grayscale(0.75) brightness(0.46) contrast(1.38) hue-rotate(165deg);
    transition: filter 0.35s ease;
}

/* Vector District & Highway Micro-Labels (Infinite Sharpness on Zoom) */
.district-label-icon { background: none !important; border: none !important; pointer-events: none; }
.district-label-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.92);
    background: rgba(7, 10, 24, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 2px 7px;
    border-radius: 99px;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%);
    backdrop-filter: blur(4px);
}
.district-label-tag.is-landmark {
    color: #bae6fd;
    border-color: rgba(0, 240, 255, 0.35);
    font-size: 9.8px;
}
.highway-shield-icon { background: none !important; border: none !important; pointer-events: none; }
.highway-shield {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid #38bdf8;
    padding: 1px 5px;
    border-radius: 5px;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}
.map-canvas.add-cursor { cursor: crosshair !important; }

/* Leaflet controls override */
.leaflet-control-zoom {
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: var(--shadow-panel) !important;
}
.leaflet-control-zoom a {
    background: rgba(12, 12, 28, 0.9) !important;
    color: #fff !important;
    border-bottom: 1px solid var(--border) !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(0, 240, 255, 0.2) !important;
}

/* Custom Neon Map Pins */
.leonida-pin-wrap { background: none !important; border: none !important; }

.leonida-pin {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 4px;
    transform: rotate(-45deg);
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.72), 0 0 12px var(--pin-color);
    transition: transform 0.16s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.map-canvas.zoom-far .leonida-pin {
    transform: rotate(-45deg) scale(0.76);
}
.map-canvas.zoom-far .leonida-pin:hover {
    transform: rotate(-45deg) scale(1.1);
}
.map-canvas.zoom-far .leonida-pin.is-highlighted {
    transform: rotate(-45deg) scale(1.18);
}

.leonida-pin svg {
    width: 15px;
    height: 15px;
    transform: rotate(45deg);
    color: #090812;
}

.leonida-pin:hover {
    transform: rotate(-45deg) scale(1.22);
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 22px var(--pin-color);
}

.leonida-pin.rarity-lendario {
    border-color: #fef08a;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.32), 0 0 20px var(--pin-color);
}
.leonida-pin.rarity-secreto {
    border-color: #f0abfc;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.35), 0 0 20px #c084fc;
}

.leonida-pin.is-found {
    opacity: 0.42;
    filter: saturate(0.45);
}
.leonida-pin.is-found::after {
    content: "✓";
    position: absolute;
    top: -6px; right: -6px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #10b981;
    color: #03140c;
    font-size: 10px;
    font-weight: 900;
    display: grid;
    place-items: center;
    transform: rotate(45deg);
    border: 1.5px solid #fff;
}

.leonida-pin.is-missable::before {
    content: "!";
    position: absolute;
    top: -7px; left: -5px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    display: grid;
    place-items: center;
    transform: rotate(45deg);
    border: 1.5px solid #fff;
    animation: pulseGlow 1.3s infinite;
}

.leonida-pin.is-highlighted {
    transform: rotate(-45deg) scale(1.3);
    box-shadow: 0 0 0 6px rgba(0, 240, 255, 0.45), 0 0 28px #00f0ff;
}

/* Region Labels */
.region-label-icon { background: none !important; border: none !important; pointer-events: none; }
.region-label-pill {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 18px var(--reg-color);
    white-space: nowrap;
    text-align: center;
    transform: translate(-50%, -50%);
}
.region-label-pill small {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 9.5px;
    letter-spacing: 1px;
    color: rgba(226, 232, 240, 0.78);
}

/* Route Waypoint Number Badges */
.route-num-icon { background: none !important; border: none !important; }
.route-num-badge {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #00f0ff;
    color: #060914;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 12px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.85);
}

/* Tooltip */
.leaflet-tooltip.leonida-tooltip {
    background: rgba(10, 10, 24, 0.94);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: #fff;
    border-radius: 9px;
    padding: 6px 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
}
.leaflet-tooltip-top.leonida-tooltip::before { border-top-color: rgba(0, 240, 255, 0.4); }

/* Floating Banners & HUD */
.floating-banner {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 99px;
    background: rgba(255, 184, 0, 0.18);
    border: 1px solid var(--vice-amber);
    backdrop-filter: blur(16px);
    font-size: 13px;
    box-shadow: var(--shadow-panel);
}

.route-bar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(10, 12, 28, 0.92);
    border: 1px solid rgba(0, 240, 255, 0.48);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 240, 255, 0.18);
    max-width: calc(100% - 24px);
    white-space: nowrap;
}
.route-bar-info { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.route-bar-info strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.route-badge {
    font-size: 10px; font-weight: 800; letter-spacing: 0.8px;
    padding: 3px 8px; border-radius: 99px;
    background: rgba(0, 240, 255, 0.2); color: var(--vice-cyan);
    flex-shrink: 0;
}
.route-meta { color: var(--text-muted); font-size: 11.5px; flex-shrink: 0; }
.route-bar-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }

.mini-btn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.mini-btn:hover { background: rgba(255, 255, 255, 0.18); }
.mini-btn.cyan { border-color: var(--vice-cyan); color: var(--vice-cyan); background: rgba(0, 240, 255, 0.12); }
.mini-btn.danger { border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }

.map-hud-bottom {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.coord-hud {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 10px;
    background: rgba(10, 10, 24, 0.88);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--text-muted);
}
.coord-hud strong { color: var(--vice-cyan); }
.coord-hud .sep { opacity: 0.35; }

.map-mini-tools { display: flex; gap: 6px; }
.hud-btn {
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(10, 10, 24, 0.88);
    backdrop-filter: blur(12px);
    color: var(--text-main);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.hud-btn:hover, .hud-btn.active {
    border-color: var(--vice-cyan);
    background: rgba(0, 240, 255, 0.16);
}

/* ==========================================================================
   DETAIL DRAWER (DIREITA)
   ========================================================================== */
.detail-drawer {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: 400px;
    max-width: calc(100vw - 24px);
    z-index: 1050;
    background: rgba(11, 11, 26, 0.95);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: var(--shadow-panel);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInRight 0.2s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

.drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
}

.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 99px;
}
.badge-rarity-lendario { background: rgba(250, 204, 21, 0.2); color: #fde047; border: 1px solid rgba(250, 204, 21, 0.45); }
.badge-rarity-secreto { background: rgba(192, 132, 252, 0.2); color: #e9d5ff; border: 1px solid rgba(192, 132, 252, 0.45); }
.badge-rarity-epico { background: rgba(255, 46, 147, 0.2); color: #fbcfe8; border: 1px solid rgba(255, 46, 147, 0.45); }
.badge-rarity-raro { background: rgba(56, 189, 248, 0.18); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.4); }
.badge-rarity-comum { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.badge-chapter { background: rgba(255, 255, 255, 0.08); color: var(--text-main); }
.badge-missable { background: rgba(239, 68, 68, 0.25); color: #fecaca; border: 1px solid #ef4444; }

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-title {
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
}
.detail-subloc {
    font-size: 12.5px;
    color: var(--vice-cyan);
    margin-top: 3px;
}

.missable-alert {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fecaca;
    font-size: 12.5px;
    line-height: 1.45;
}

.reward-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.reward-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 11px;
}
.reward-card small { display: block; font-size: 10.5px; color: var(--text-muted); margin-bottom: 2px; }
.reward-card strong { font-size: 13px; color: #fff; }
.reward-card.cash strong { color: #4ade80; font-size: 15px; }

.detail-block {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 12px;
}
.detail-block h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.detail-block p { font-size: 13.5px; line-height: 1.55; color: #e2e8f0; }

.detail-block.tip {
    background: rgba(255, 184, 0, 0.08);
    border-color: rgba(255, 184, 0, 0.3);
}
.detail-block.tip h4 { color: var(--vice-amber); }

.detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-primary, .btn-secondary, .btn-success, .btn-danger {
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.16s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--vice-pink), #9333ea);
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 46, 147, 0.35);
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border);
    color: var(--text-main);
}
.btn-secondary:hover { border-color: var(--vice-cyan); background: rgba(0, 240, 255, 0.12); }
.btn-success {
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--vice-emerald);
    color: #a7f3d0;
}
.btn-danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fecaca;
}

/* ==========================================================================
   LEONIDA AI COPILOT PANEL
   ========================================================================== */
.ai-panel {
    width: 390px;
    max-width: 100vw;
    flex-shrink: 0;
    height: 100%;
    background: rgba(11, 11, 25, 0.94);
    backdrop-filter: blur(22px);
    border-left: 1px solid rgba(255, 46, 147, 0.25);
    display: flex;
    flex-direction: column;
    z-index: 950;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    transition: margin-right 0.25s ease;
}

.ai-panel.collapsed {
    margin-right: -390px;
}

.ai-header {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255, 46, 147, 0.14), rgba(0, 240, 255, 0.08));
}
.ai-title { display: flex; align-items: center; gap: 10px; }
.ai-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--grad-pink-cyan);
    color: #070710;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 16px;
    display: grid;
    place-items: center;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}
.ai-title h2 { font-family: 'Rajdhani', sans-serif; font-size: 16px; letter-spacing: 0.8px; line-height: 1.1; }
.ai-provider-tag { font-size: 11px; color: var(--vice-cyan); }
.ai-header-actions { display: flex; gap: 6px; }

.ai-quick-prompts {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex-shrink: 0;
}
.qp-chip {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 99px;
    border: 1px solid rgba(0, 240, 255, 0.28);
    background: rgba(0, 240, 255, 0.08);
    color: #e0f2fe;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.16s;
    white-space: nowrap;
}
.qp-chip:hover {
    background: rgba(255, 46, 147, 0.22);
    border-color: var(--vice-pink);
    color: #fff;
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-msg {
    max-width: 96%;
    padding: 11px 13px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.55;
    animation: fadeUp 0.2s ease;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(255, 46, 147, 0.3), rgba(168, 85, 247, 0.3));
    border: 1px solid rgba(255, 46, 147, 0.45);
    border-bottom-right-radius: 4px;
}
.ai-msg.assistant {
    align-self: flex-start;
    background: rgba(24, 24, 48, 0.85);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.ai-msg h3 { font-size: 14px; color: var(--vice-cyan); margin-bottom: 6px; }
.ai-msg p { margin-bottom: 6px; }
.ai-msg p:last-child { margin-bottom: 0; }
.ai-msg strong { color: #fff; }
.ai-msg blockquote {
    border-left: 3px solid var(--vice-danger);
    padding: 5px 9px;
    margin: 6px 0;
    background: rgba(239, 68, 68, 0.12);
    border-radius: 0 6px 6px 0;
    font-size: 12px;
}

.ai-marker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ai-loc-chip {
    border: 1px solid rgba(0, 240, 255, 0.35);
    background: rgba(0, 240, 255, 0.1);
    color: #cffafe;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
}
.ai-loc-chip:hover {
    background: rgba(0, 240, 255, 0.25);
    color: #fff;
}
.ai-route-cta {
    margin-top: 8px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--vice-emerald);
    background: rgba(16, 185, 129, 0.18);
    color: #a7f3d0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.ai-route-cta:hover { background: rgba(16, 185, 129, 0.32); color: #fff; }

.ai-input-wrap {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: rgba(9, 9, 20, 0.9);
}
.ai-input-wrap input {
    flex: 1;
    height: 40px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(22, 22, 46, 0.9);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
}
.ai-input-wrap input:focus { outline: none; border-color: var(--vice-pink); }

.ai-send-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    border: none;
    background: var(--grad-pink-cyan);
    color: #090812;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.ai-send-btn svg { width: 18px; height: 18px; }
.ai-send-btn:hover { transform: scale(1.06); }
.ai-send-btn:disabled { opacity: 0.45; cursor: wait; }

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4, 4, 12, 0.78);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal-card {
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    background: #101126;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-card.modal-lg { max-width: 820px; }

.modal-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255, 46, 147, 0.12), rgba(0, 240, 255, 0.06));
}
.modal-head h2 { font-size: 18px; font-weight: 700; }
.modal-head p { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.modal-body {
    padding: 18px 20px;
    overflow-y: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.span-2 { grid-column: span 2; }
.checkbox-inline label {
    display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer;
}
.info-box {
    padding: 11px 13px;
    border-radius: 10px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.28);
    font-size: 12.5px;
    line-height: 1.5;
}
.info-box code {
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--vice-cyan);
}
.field-hint { display: block; margin-top: 4px; font-size: 11px; color: var(--text-muted); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Progress Dashboard */
.stats-hero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.stat-tile {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}
.stat-tile small { display: block; font-size: 11px; color: var(--text-muted); }
.stat-tile strong { display: block; font-size: 22px; margin-top: 3px; font-family: 'Rajdhani', sans-serif; }
.stat-tile.pink strong { color: var(--vice-pink); }
.stat-tile.cyan strong { color: var(--vice-cyan); }
.stat-tile.green strong { color: #4ade80; }
.stat-tile.amber strong { color: var(--vice-amber); }

.progress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.prog-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}
.prog-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 10px; }
.prog-row { margin-bottom: 9px; }
.prog-row-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.prog-bar {
    height: 7px; border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.prog-bar-fill { height: 100%; border-radius: 99px; transition: width 0.35s ease; }

.profile-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* Saved Routes List */
.saved-route-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* Toasts */
.toast-stack {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 11px 16px;
    border-radius: 11px;
    background: rgba(14, 14, 34, 0.96);
    border: 1px solid var(--vice-cyan);
    color: #fff;
    font-size: 13px;
    box-shadow: var(--shadow-panel);
    animation: fadeUp 0.2s ease;
}
.toast.error { border-color: var(--vice-danger); }

/* Responsive */
@media (max-width: 1180px) {
    .map-style-switcher { display: none; }
    .floating-style-switcher { display: flex; }
    .ai-panel { position: absolute; right: 0; top: 0; bottom: 0; }
}
@media (max-width: 520px) {
    .floating-style-switcher .style-btn span { display: none; }
    .floating-style-switcher .style-btn { padding: 5px 8px; }
}
@media (max-width: 820px) {
    .sidebar { position: absolute; left: 0; top: 0; bottom: 0; }
    .brand-text p, .action-btn span { display: none; }
    .stats-hero, .progress-grid, .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
}


/* ==========================================================================
   V2 UPGRADES: GPS RADAR AO REDOR, AUTOCOMPLETE, CONTEXT MENU & GUIA
   ========================================================================== */
.gps-btn {
    border-color: rgba(0, 240, 255, 0.45);
    background: rgba(0, 240, 255, 0.12);
    color: #cffafe;
}
.gps-btn:hover, .gps-btn.has-pos {
    border-color: var(--vice-cyan);
    background: rgba(0, 240, 255, 0.24);
    color: #fff;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.28);
}

.floating-banner.cyan {
    background: rgba(0, 240, 255, 0.16);
    border-color: var(--vice-cyan);
}

/* Search Autocomplete Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: rgba(11, 12, 28, 0.97);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 13px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.78);
    max-height: 360px;
    overflow-y: auto;
    z-index: 2500;
    padding: 6px;
}
.search-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.14s;
}
.search-dd-item:hover { background: rgba(0, 240, 255, 0.14); }
.search-dd-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.search-dd-body { min-width: 0; flex: 1; }
.search-dd-body strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-dd-body small { display: block; font-size: 11px; color: var(--text-muted); }

/* Player GPS Pulsing Sonar Marker on Leaflet Map */
.player-gps-icon { background: none !important; border: none !important; }
.player-gps-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    cursor: grab;
}
.player-gps-wrap:active { cursor: grabbing; }
.player-gps-sonar {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid #00f0ff;
    background: rgba(0, 240, 255, 0.18);
    animation: sonarPulse 2s ease-out infinite;
}
@keyframes sonarPulse {
    0% { transform: scale(0.55); opacity: 0.95; }
    100% { transform: scale(1.9); opacity: 0; }
}
.player-gps-core {
    position: relative;
    z-index: 2;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 15%, #00f0ff 65%, #0284c7 100%);
    border: 3px solid #fff;
    box-shadow: 0 0 22px #00f0ff, 0 4px 12px rgba(0, 0, 0, 0.8);
}
.player-gps-tag {
    position: absolute;
    top: -19px;
    left: 50%;
    transform: translateX(-50%);
    background: #00f0ff;
    color: #04101c;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.8px;
    padding: 1px 7px;
    border-radius: 99px;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.7);
}

/* Floating Nearby Radar Panel */
.nearby-panel {
    position: absolute;
    top: 66px;
    left: 14px;
    width: 326px;
    max-width: calc(100% - 28px);
    max-height: calc(100% - 134px);
    z-index: 940;
    background: rgba(9, 12, 28, 0.93);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.42);
    border-radius: 15px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.72), 0 0 26px rgba(0, 240, 255, 0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeUp 0.2s ease;
}

.nearby-head {
    padding: 11px 13px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.16), rgba(255, 46, 147, 0.08));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.nearby-title-row { display: flex; align-items: center; gap: 7px; }
.nearby-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--vice-cyan);
    box-shadow: 0 0 10px var(--vice-cyan);
    animation: pulseGlow 1.5s infinite;
}
.nearby-head h3 { font-family: 'Rajdhani', sans-serif; font-size: 15px; letter-spacing: 0.9px; }
.nearby-head small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.nearby-head-btns { display: flex; gap: 4px; flex-shrink: 0; }

.nearby-controls {
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.radius-row label {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.radius-row label strong { color: var(--vice-cyan); font-family: 'JetBrains Mono', monospace; }
.radius-row input[type="range"] { width: 100%; accent-color: var(--vice-cyan); cursor: pointer; }

.nearby-tabs { display: flex; gap: 5px; }
.ntab {
    flex: 1;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.14s;
}
.ntab:hover { color: #fff; }
.ntab.active {
    background: rgba(0, 240, 255, 0.18);
    border-color: var(--vice-cyan);
    color: #fff;
}

.nearby-summary {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.28);
    border-bottom: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--text-main);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.nearby-summary .ns-cash { color: #4ade80; font-weight: 700; }
.nearby-summary .ns-miss { color: #fca5a5; font-weight: 700; }

.nearby-cta-row {
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}
.mini-btn.pink {
    border-color: rgba(255, 46, 147, 0.55);
    color: #fbcfe8;
    background: rgba(255, 46, 147, 0.16);
}
.mini-btn.pink:hover { background: rgba(255, 46, 147, 0.3); color: #fff; }

.nearby-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nearby-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.14s;
}
.nearby-item:hover {
    background: rgba(0, 240, 255, 0.11);
    border-color: rgba(0, 240, 255, 0.35);
}
.nearby-item.is-found { opacity: 0.5; }
.nearby-dist-pill {
    flex-shrink: 0;
    min-width: 56px;
    text-align: center;
    padding: 4px 6px;
    border-radius: 8px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    line-height: 1.25;
    color: var(--vice-cyan);
}
.nearby-dist-pill small { display: block; font-size: 9.5px; color: #e2e8f0; }
.nearby-item-info { min-width: 0; flex: 1; }
.nearby-item-info strong {
    display: block;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nearby-item-info small { display: block; font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }
.nearby-quick-check {
    width: 26px; height: 26px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    font-weight: 800;
}
.nearby-quick-check:hover, .nearby-quick-check.done {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--vice-emerald);
    color: #86efac;
}

/* Right-Click Context Menu on Map */
.context-menu {
    position: fixed;
    z-index: 2600;
    min-width: 248px;
    background: rgba(11, 12, 28, 0.96);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 240, 255, 0.42);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.78);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.context-menu button {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    padding: 9px 11px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.14s;
}
.context-menu button:hover {
    background: rgba(0, 240, 255, 0.18);
    color: #fff;
}

/* Gemini Setup Box & Test Result */
.gemini-guide-box {
    padding: 13px 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(168, 85, 247, 0.12));
    border: 1px solid rgba(0, 240, 255, 0.35);
    font-size: 12.5px;
    line-height: 1.55;
}
.gemini-guide-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.gemini-guide-box ol { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: #dbeafe; }
.gemini-guide-box code {
    background: rgba(0, 0, 0, 0.42);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--vice-cyan);
}
.ai-test-ok {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid var(--vice-emerald);
    color: #a7f3d0;
    font-size: 12.5px;
}
.ai-test-err {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid var(--vice-danger);
    color: #fecaca;
    font-size: 12.5px;
}

/* Quick Guide Modal */
.guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.guide-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}
.guide-card.warn { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.06); }
.guide-card.money { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.06); }
.guide-card h3 { font-size: 14px; margin-bottom: 9px; color: var(--vice-cyan); }
.guide-card.warn h3 { color: #fca5a5; }
.guide-card.money h3 { color: #86efac; }
.guide-card ul { padding-left: 16px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; line-height: 1.5; color: #e2e8f0; }
.guide-card code {
    background: rgba(0, 0, 0, 0.45);
    padding: 1px 6px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--vice-amber);
}
@media (max-width: 820px) {
    .guide-grid { grid-template-columns: 1fr; }
}


/* Strict Chapter Filter Pills & Floating Active Chapter Banner */
.chapter-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}
.cpill {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.cpill:hover { color: #fff; border-color: rgba(255, 184, 0, 0.45); }
.cpill.active {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.28), rgba(255, 46, 147, 0.22));
    border-color: var(--vice-amber);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 184, 0, 0.25);
}

.chapter-active-bar {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 945;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 11px;
    background: rgba(16, 12, 32, 0.94);
    border: 1px solid rgba(255, 184, 0, 0.6);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.68), 0 0 18px rgba(255, 184, 0, 0.16);
    font-size: 12px;
    font-weight: 600;
    color: #fef08a;
}
.cat-row.empty-in-chapter {
    opacity: 0.28;
}


/* ==========================================================================
   AUTENTIC GTA 6 IN-GAME RADAR BLIPS (Shields, Circles & Rounded Squares)
   ========================================================================== */
.gta6-blip {
    position: relative;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: var(--blip-bg, #1c222e);
    color: var(--blip-fg, #ffd600);
    border: 2px solid var(--blip-border, #ffffff);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(0, 0, 0, 0.55);
    transition: transform 0.14s ease, opacity 0.18s ease, box-shadow 0.16s ease;
}

.gta6-blip svg {
    width: 16px;
    height: 16px;
    display: block;
}

.gta6-blip.shape-circle {
    border-radius: 50%;
}
.gta6-blip.shape-square {
    border-radius: 7px;
}
.gta6-blip.shape-shield {
    border-radius: 7px 7px 14px 14px;
    height: 30px;
}
.gta6-blip.shape-shield::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--blip-border, #111);
}

.gta6-blip:hover {
    transform: scale(1.24);
    z-index: 9999;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.85), 0 0 14px var(--blip-fg);
}

.map-canvas.zoom-far .gta6-blip {
    transform: scale(0.78);
}
.map-canvas.zoom-far .gta6-blip:hover {
    transform: scale(1.16);
}
.map-canvas.zoom-far .gta6-blip.is-highlighted {
    transform: scale(1.22);
}

.gta6-blip.rarity-lendario {
    box-shadow: 0 0 0 2px rgba(255, 214, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.8);
}
.gta6-blip.is-highlighted {
    transform: scale(1.28);
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.6), 0 0 22px #00f0ff;
}

.gta6-blip.is-found {
    opacity: 0.42;
    filter: saturate(0.35);
}
.gta6-blip .blip-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #10b981;
    color: #03140c;
    font-size: 9.5px;
    font-weight: 900;
    display: grid;
    place-items: center;
    border: 1.5px solid #fff;
}
.gta6-blip .blip-miss {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    display: grid;
    place-items: center;
    border: 1.5px solid #fff;
    animation: pulseGlow 1.3s infinite;
}

/* Sidebar Category Blip Preview matching exact GTA 6 game icons */
.cat-icon-box.gta6-cat-blip {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.cat-icon-box.gta6-cat-blip.shape-circle { border-radius: 50%; }


/* ==========================================================================
   MULTI-USER AUTH UI & QUICK COMPLETE CONTROLS
   ========================================================================== */
.account-btn {
    padding: 0 10px 0 5px;
    border-radius: 99px;
    border-color: rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.14);
    max-width: 150px;
}
.account-btn #topAccountName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 1540px) {
    .brand-text p { display: none; }
    .style-btn { padding: 5px 8px; font-size: 11.5px; }
    .action-btn { padding: 0 9px; font-size: 12px; gap: 5px; height: 35px; }
    .icon-btn { width: 35px; height: 35px; }
    .progress-pill { padding: 3px 8px 3px 5px; gap: 6px; }
    .progress-pill-text small { display: none; }
    .account-btn { padding: 0 9px 0 5px; max-width: 132px; }
}
.account-btn:hover {
    border-color: var(--vice-cyan);
    background: rgba(0, 240, 255, 0.16);
}
.account-btn.logged-in {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.14);
}
.account-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #070812;
    font-weight: 800;
    font-size: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.auth-tab {
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s;
}
.auth-tab.active {
    background: linear-gradient(135deg, rgba(255, 46, 147, 0.25), rgba(0, 240, 255, 0.2));
    border-color: var(--vice-cyan);
    color: #fff;
}

.account-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(255, 46, 147, 0.1));
    border: 1px solid rgba(0, 240, 255, 0.3);
    margin-bottom: 14px;
}
.account-hero-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #070812;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 24px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}
.role-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    margin-left: 6px;
    background: rgba(255, 184, 0, 0.22);
    color: #fde047;
    border: 1px solid rgba(255, 184, 0, 0.5);
}
.role-badge.player {
    background: rgba(0, 240, 255, 0.16);
    color: #a5f3fc;
    border-color: rgba(0, 240, 255, 0.4);
}
.result-quick-check {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
}
.result-quick-check:hover, .result-quick-check.done {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--vice-emerald);
    color: #86efac;
}


/* ==========================================================================
   V4 SUPER-UPGRADES: VISION, VOZ, CLUSTERS, MINI-MAPA, PLATINA, ADMIN & PWA
   ========================================================================== */
.sub-hint {
    font-size: 10.5px;
    color: var(--text-dim);
}

/* Sessão Rápida, Equipamentos & Horário */
.session-pills, .gear-pills, .time-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.spill, .gpill, .tpill {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.16s;
}
.spill {
    flex: 1;
    text-align: center;
    border-color: rgba(255, 184, 0, 0.35);
    color: #fde68a;
    background: rgba(255, 184, 0, 0.08);
}
.spill:hover {
    background: rgba(255, 184, 0, 0.24);
    border-color: var(--vice-amber);
    color: #fff;
    transform: translateY(-1px);
}
.gpill.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.65);
    color: #a7f3d0;
}
.gpill:not(.active) {
    opacity: 0.55;
    text-decoration: line-through;
}
.tpill {
    flex: 1;
    text-align: center;
}
.tpill.active {
    background: rgba(0, 240, 255, 0.18);
    border-color: var(--vice-cyan);
    color: #fff;
}

/* Clusters Inteligentes (Estilo Tático GTABase — Alta Legibilidade sobre Tiles 16K) */
.leonida-cluster-wrap { background: none !important; border: none !important; }
.leonida-cluster {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    color: #fff;
    background: rgba(12, 16, 34, 0.92);
    border: 2.5px solid #00f0ff;
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.24), 0 4px 14px rgba(0, 0, 0, 0.72);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    cursor: pointer;
}
.leonida-cluster:hover {
    transform: scale(1.14);
    box-shadow: 0 0 0 5px rgba(0, 240, 255, 0.35), 0 6px 18px rgba(0, 0, 0, 0.85);
}
.leonida-cluster.tier-sm {
    background: radial-gradient(circle at 30% 30%, #0e7490, #0c1428 85%);
    border-color: #38bdf8;
}
.leonida-cluster.tier-md {
    background: radial-gradient(circle at 30% 30%, #d97706, #1f1308 88%);
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.26), 0 4px 14px rgba(0, 0, 0, 0.72);
    font-size: 15px;
}
.leonida-cluster.tier-lg {
    background: radial-gradient(circle at 30% 30%, #db2777, #1c0b24 88%);
    border-color: #ff2e93;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 0 0 4px rgba(255, 46, 147, 0.3), 0 5px 18px rgba(0, 0, 0, 0.78);
}

/* Mini-Mapa Interativo */
.minimap-box {
    position: absolute;
    left: 16px;
    bottom: 64px;
    z-index: 900;
    background: rgba(8, 10, 24, 0.92);
    border: 1.5px solid rgba(0, 240, 255, 0.45);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
}
.minimap-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #a5f3fc;
    background: rgba(0, 240, 255, 0.12);
    border-bottom: 1px solid rgba(0, 240, 255, 0.25);
}
.minimap-head button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.minimap-head button:hover { color: #fff; }
#miniMapCanvas {
    display: block;
    cursor: crosshair;
}

/* HUD extra buttons */
.hud-btn.gold {
    border-color: rgba(255, 184, 0, 0.55);
    background: rgba(255, 184, 0, 0.14);
    color: #fde68a;
}
.map-hud-bottom {
    max-width: calc(100% - 62px);
    flex-wrap: wrap;
}
.map-mini-tools {
    flex-wrap: wrap;
}
.hud-btn.gold:hover {
    background: rgba(255, 184, 0, 0.28);
    color: #fff;
}
.hud-btn.admin-hud {
    border-color: rgba(255, 46, 147, 0.6);
    background: rgba(255, 46, 147, 0.18);
    color: #fbcfe8;
}
.hud-btn.cyan {
    border-color: rgba(0, 240, 255, 0.55);
    background: rgba(0, 240, 255, 0.14);
    color: #a5f3fc;
}

/* Gemini Vision & Voz PT-BR no AI Copilot */
.ai-img-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 240, 255, 0.1);
    border-top: 1px solid rgba(0, 240, 255, 0.35);
}
.ai-img-preview img {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--vice-cyan);
}
.ai-img-meta {
    flex: 1;
    min-width: 0;
}
.ai-img-meta strong { display: block; font-size: 11.5px; color: #a5f3fc; }
.ai-img-meta small { display: block; font-size: 10.5px; color: var(--text-muted); }

.ai-tool-btn {
    width: 34px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.16s;
}
.ai-tool-btn:hover {
    border-color: var(--vice-cyan);
    background: rgba(0, 240, 255, 0.15);
}
.ai-tool-btn.recording {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.32);
    animation: pulseGlow 1s infinite;
}
#btnAiTts.active-tts {
    border-color: var(--vice-cyan);
    background: rgba(0, 240, 255, 0.22);
}

/* Modo Sem Spoilers no Drawer */
.detail-block.spoiler-masked {
    position: relative;
    overflow: hidden;
}
.detail-block.spoiler-masked p {
    filter: blur(7px);
    user-select: none;
    opacity: 0.45;
}
.spoiler-reveal-btn {
    position: absolute;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);
    padding: 6px 12px;
    border-radius: 99px;
    border: 1px solid var(--vice-cyan);
    background: rgba(10, 12, 28, 0.94);
    color: #a5f3fc;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}
.spoiler-reveal-btn:hover { background: var(--vice-cyan); color: #070812; }

/* Comentários & Prints da Comunidade */
.detail-ref-img, .comment-img {
    width: 100%;
    max-height: 190px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid var(--border);
    margin-top: 6px;
    cursor: zoom-in;
}
.detail-comments-section {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 6px;
}
.comments-head h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #a5f3fc;
    margin-bottom: 8px;
}
.comments-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 0;
}
.comment-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 10px;
    margin-bottom: 8px;
}
.comment-card.is-pinned {
    border-color: rgba(255, 184, 0, 0.55);
    background: rgba(255, 184, 0, 0.07);
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.comment-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    color: #070812;
}
.comment-meta small { margin-left: auto; font-size: 10px; color: var(--text-dim); }
.pin-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 99px;
    background: rgba(255, 184, 0, 0.22);
    color: #fde047;
    font-weight: 700;
}
.comment-text {
    font-size: 12.5px;
    line-height: 1.45;
    color: #e2e8f0;
    white-space: pre-wrap;
}
.comment-video-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--vice-cyan);
    text-decoration: none;
    font-weight: 600;
}
.comment-video-link:hover { text-decoration: underline; }
.comment-actions {
    display: flex;
    gap: 6px;
    margin-top: 7px;
}
.comment-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.comment-form textarea, .comment-form input[type="url"] {
    width: 100%;
    background: rgba(10, 10, 24, 0.9);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    padding: 7px 9px;
}
.comment-form-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.comment-form-row input[type="url"] { flex: 1; min-width: 0; }
.cmt-file-label { font-size: 11px; color: #86efac; }

/* Lightbox */
.lightbox-inner {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
}
.lightbox-inner img {
    max-width: 92vw;
    max-height: 86vh;
    border-radius: 12px;
    border: 2px solid var(--vice-cyan);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}
#btnCloseLightbox {
    position: absolute;
    top: -14px;
    right: -14px;
    background: #ef4444;
    border-color: #fff;
    color: #fff;
}

/* Ranking & Troféus (Platina) */
.lb-list, .admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 430px;
    overflow-y: auto;
}
.lb-row, .admin-user-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
}
.lb-row.is-me {
    border-color: rgba(0, 240, 255, 0.65);
    background: rgba(0, 240, 255, 0.09);
}
.lb-rank {
    width: 32px;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 800;
}
.lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #070812;
    flex-shrink: 0;
}
.lb-user { flex: 1; min-width: 0; }
.lb-user small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lb-you {
    font-size: 9.5px;
    background: var(--vice-cyan);
    color: #070812;
    padding: 1px 6px;
    border-radius: 99px;
    font-weight: 800;
    margin-left: 5px;
}
.lb-metrics { text-align: right; flex-shrink: 0; }
.lb-metrics strong { display: block; font-size: 17px; color: #86efac; }
.lb-metrics small { font-size: 11px; color: var(--text-muted); }

.trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 10px;
    max-height: 410px;
    overflow-y: auto;
}
.trophy-card {
    display: flex;
    gap: 11px;
    padding: 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    opacity: 0.78;
}
.trophy-card.unlocked {
    opacity: 1;
    border-color: rgba(16, 185, 129, 0.65);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(0, 240, 255, 0.06));
}
.trophy-card.tier-platinum.unlocked {
    border-color: #00f0ff;
    box-shadow: 0 0 22px rgba(0, 240, 255, 0.3);
}
.trophy-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    display: grid;
    place-items: center;
    font-size: 22px;
    flex-shrink: 0;
}
.trophy-body { flex: 1; min-width: 0; }
.trophy-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.trophy-body p { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.trophy-tier {
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    color: #fde68a;
}
.trophy-card.tier-platinum .trophy-tier { background: rgba(0, 240, 255, 0.22); color: #a5f3fc; }

/* Painel Admin */
.admin-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.admin-picker-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}
.admin-pick-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    font-size: 12px;
}
.floating-banner.amber {
    border-color: rgba(255, 184, 0, 0.75);
    background: rgba(28, 20, 6, 0.94);
    color: #fde68a;
}
.admin-drag-pin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #ff2e93);
    border: 3px solid #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
    box-shadow: 0 0 24px rgba(250, 204, 21, 0.9);
    cursor: grab;
    animation: pulseGlow 1.1s infinite;
}

/* ==========================================================================
   MODO SEGUNDA TELA MOBILE (PWA <= 768px)
   ========================================================================== */
.mobile-nav-dock {
    display: none;
}

@media (max-width: 768px) {
    :root { --topbar-h: 54px; }
    .topbar { padding: 0 8px; gap: 6px; }
    .brand-text, .map-style-switcher, #btnAddMarkerMode, #btnToggleAI, #btnGuideModal, .coord-hud {
        display: none !important;
    }
    .topbar-center { max-width: none; }
    .search-wrap { min-width: 0; max-width: none; }
    .search-kbd { display: none; }
    .progress-pill { padding: 3px 6px; }
    .progress-pill-text { display: none; }
    .action-btn.gps-btn span { display: none; }
    .account-btn { max-width: 108px; }

    .workspace {
        bottom: 58px;
    }
    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 58px;
        top: auto;
        width: 100% !important;
        height: 62vh;
        border-right: none;
        border-top: 2px solid var(--vice-cyan);
        border-radius: 18px 18px 0 0;
        z-index: 1050;
        transition: transform 0.25s ease;
    }
    .sidebar.collapsed {
        transform: translateY(110%);
        margin-left: 0;
        pointer-events: none;
    }
    .ai-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 58px;
        top: auto;
        width: 100% !important;
        height: 68vh;
        border-left: none;
        border-top: 2px solid var(--vice-pink);
        border-radius: 18px 18px 0 0;
        z-index: 1060;
        transition: transform 0.25s ease;
    }
    .ai-panel.collapsed {
        transform: translateY(110%);
        margin-right: 0;
        pointer-events: none;
    }
    .detail-drawer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 58px;
        top: auto;
        width: 100% !important;
        max-height: 74vh;
        border-left: none;
        border-top: 2px solid var(--vice-amber);
        border-radius: 18px 18px 0 0;
        z-index: 1070;
    }
    .nearby-panel {
        left: 8px;
        right: 8px;
        width: auto;
        bottom: 10px;
        max-height: 55vh;
    }
    .map-hud-bottom {
        left: 8px;
        right: 54px;
        bottom: 8px;
    }
    .map-credit-pill {
        right: 8px;
        bottom: 52px;
        font-size: 9.5px;
        padding: 2px 7px;
    }
    .map-mini-tools {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }
    .mobile-nav-dock {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 58px;
        z-index: 1250;
        background: rgba(8, 8, 22, 0.96);
        backdrop-filter: blur(18px);
        border-top: 1px solid var(--border);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mnav-btn {
        border: none;
        background: transparent;
        color: var(--text-muted);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-family: inherit;
        cursor: pointer;
    }
    .mnav-btn span { font-size: 18px; line-height: 1; }
    .mnav-btn small { font-size: 10px; font-weight: 600; }
    .mnav-btn.active { color: var(--vice-cyan); }
}

/* ==========================================================================
   V10.0 — MODO SEGREDOS, PRÉDIOS ENTRÁVEIS, CAPÍTULOS DUPLOS, ROTAS PRONTAS
   E SEGREDOS PRÓXIMOS NO CARD (INSPIRADO NO GTA6MAP.CITY)
   ========================================================================== */
.view-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.vm-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}
.vm-btn small {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--text-muted);
}
.vm-btn:hover { border-color: rgba(0, 240, 255, 0.45); color: #fff; }
.vm-btn.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 180, 255, 0.08));
    border-color: var(--vice-cyan);
    color: #fff;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.18);
}
.vm-btn.active small { background: rgba(0, 240, 255, 0.25); color: #e0faff; }
.vm-btn.secrets.active {
    background: linear-gradient(135deg, rgba(255, 46, 147, 0.28), rgba(168, 85, 247, 0.14));
    border-color: var(--vice-pink);
    box-shadow: 0 0 16px rgba(255, 46, 147, 0.24);
}
.vm-btn.secrets.active small { background: rgba(255, 46, 147, 0.3); color: #ffe4f3; }

.secrets-subpills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}
.sp-pill {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 46, 147, 0.28);
    background: rgba(255, 46, 147, 0.08);
    color: #f9a8d4;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.sp-pill:hover { border-color: var(--vice-pink); color: #fff; }
.sp-pill.active {
    background: var(--vice-pink);
    border-color: var(--vice-pink);
    color: #0b0816;
}

.enterable-toggle-btn {
    margin-top: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 11px;
    border-radius: 9px;
    border: 1px solid rgba(163, 230, 53, 0.35);
    background: rgba(163, 230, 53, 0.08);
    color: #d9f99d;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}
.enterable-toggle-btn small {
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(163, 230, 53, 0.18);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
}
.enterable-toggle-btn:hover { background: rgba(163, 230, 53, 0.16); color: #fff; }
.enterable-toggle-btn.active {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.32), rgba(16, 185, 129, 0.2));
    border-color: #a3e635;
    color: #fff;
    box-shadow: 0 0 12px rgba(163, 230, 53, 0.25);
}

.chapter-mode-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 7px;
}
.cmode-btn {
    padding: 5px 7px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.cmode-btn:hover { color: #fff; border-color: rgba(0, 240, 255, 0.4); }
.cmode-btn.active {
    background: rgba(0, 240, 255, 0.16);
    border-color: var(--vice-cyan);
    color: #e0faff;
}
.chapter-insights {
    margin-top: 7px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 11px;
    color: var(--text-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.ci-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 600;
}
.ci-tag.warn { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }

.preset-routes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.preset-route-card {
    text-align: left;
    padding: 7px 8px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.16s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.preset-route-card strong {
    font-size: 11.5px;
    color: #f8fafc;
    line-height: 1.25;
}
.preset-route-card small {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.preset-route-card:hover {
    border-color: rgba(255, 46, 147, 0.55);
    background: rgba(255, 46, 147, 0.12);
    transform: translateY(-1px);
}
.preset-route-card.active {
    border-color: var(--vice-cyan);
    background: rgba(0, 240, 255, 0.14);
}

.detail-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.trust-pill.verified { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.45); }
.trust-pill.gtadb { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }
.trust-pill.exact { background: rgba(250, 204, 21, 0.16); color: #fde047; border: 1px solid rgba(250, 204, 21, 0.4); }
.trust-pill.approx { background: rgba(251, 146, 60, 0.16); color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.4); }

.nearby-in-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
}
.nic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.14s;
}
.nic-row:hover {
    border-color: rgba(0, 240, 255, 0.45);
    background: rgba(0, 240, 255, 0.1);
    color: #fff;
}
.nic-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.nic-left strong {
    font-size: 12px;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nic-left small { font-size: 10.5px; color: var(--text-muted); }
.nic-dist {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--vice-cyan);
}
