:root {
    --bg-color: #0d0d0d;
    --card-bg: rgba(30, 30, 30, 0.6);
    --primary: #00f3ff;
    /* Electric Blue */
    --accent: #39ff14;
    /* Neon Green */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --gradient-main: linear-gradient(135deg, #00f3ff, #39ff14);
    --shadow-main: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* TEMAS (Padrão: Cyan) */
    --accent-red: #ff3b3b;
    --accent-green: #00ff41;
    --accent-purple: #bc13fe;

    /* Config Elite Leaflet */
    --leaflet-popup-bg: rgba(20, 20, 20, 0.95);
}

/* MATRIX THEME */
body.theme-matrix {
    --primary: #00ff41;
    --primary-glow: rgba(0, 255, 65, 0.5);
}

/* INFERNO THEME */
body.theme-inferno {
    --primary: #ff3b3b;
    --primary-glow: rgba(255, 59, 59, 0.5);
}

/* STEALTH THEME */
body.theme-stealth {
    --primary: #bc13fe;
    --primary-glow: rgba(188, 19, 254, 0.5);
}

/* HUD MIRROR MODE */
body.hud-mode-active {
    background: #000 !important;
}

body.hud-mode-active .app-header,
body.hud-mode-active .filters-container,
body.hud-mode-active .search-container,
body.hud-mode-active main,
body.hud-mode-active .fab-container {
    display: none !important;
}

body.hud-mode-active .tracking-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000;
    transform: scaleY(-1);
    /* Reflexão Vertical para Para-brisa */
    border: none;
}

body.hud-mode-active .tracking-info {
    flex-direction: column;
    gap: 3rem;
    transform: scaleX(-1);
    /* Reflexão Horizontal se necessário (depende da inclinação) */
}

body.hud-mode-active .telemetry-item {
    font-size: 3rem;
}

body.hud-mode-active .telemetry-item span {
    font-size: 6rem;
}

body.hud-mode-active .elite-telemetry {
    border: none;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    /* Fundo sutil */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 243, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(57, 255, 20, 0.05) 0%, transparent 40%);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 13, 13, 0.8);
    border-bottom: var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    padding: 5px;
}

.icon-btn:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-header-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-header-action:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    transform: translateY(-2px);
}

.btn-header-action i {
    font-size: 0.9rem;
}

@media (max-width: 450px) {
    .btn-header-action span {
        display: none;
    }

    .btn-header-action {
        padding: 8px;
    }
}

.btn-install-premium {
    background: linear-gradient(90deg, #D4AF37, #b8952d);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: #000;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    animation: pulseInstall 2s infinite;
    white-space: nowrap;
}

@keyframes pulseInstall {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Busca */
.search-container {
    padding: 1rem 1.5rem 0.5rem;
}

.search-box {
    background: rgba(42, 42, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    background: rgba(42, 42, 42, 0.9);
}

.search-box i {
    color: var(--text-muted);
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-size: 0.95rem;
}

/* Filtros */
.filters-container {
    padding: 0.5rem 1.5rem;
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0.5rem;
}

.filters-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn.active {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* Grid de Cards */
.container {
    padding: 1rem 1.5rem 6rem;
    /* Ajustado */
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* Card Estilo Glass */
.card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    backdrop-filter: blur(16px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 243, 255, 0.2);
    border-color: rgba(0, 243, 255, 0.4);
}

.card:active {
    transform: scale(0.98);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.card-actions-top {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.btn-delete {
    background: none;
    border: none;
    color: #ff3b3b;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.card-notes {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #ccc;
    font-style: italic;
}

.card-actions-row {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.btn-card {
    border: none;
    border-radius: 50px;
    /* Pill shape */
    padding: 0.8rem;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: filter 0.2s;
}

.btn-waze {
    background: var(--gradient-main);
}

.btn-whatsapp {
    background: #25D366;
    /* WhatsApp Green */
    color: #fff;
}

.btn-card:hover {
    filter: brightness(1.1);
}

.btn-share-pro {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary);
    grid-column: span 2;
    /* Ocupa a linha toda */
}

.btn-share-pro:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary);
}

/* FAB Container */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 200;
}

.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.4);
    font-size: 1.5rem;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    flex-shrink: 0;
}

.btn-track-fab {
    background: #1e1e1e;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-track-fab.recording {
    background: #ff3b3b;
    border-color: #ff3b3b;
    color: #fff;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 59, 59, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 59, 0);
    }
}

.btn-sos-fab {
    background: #000;
    color: #ff3b3b;
    border: 2px solid #ff3b3b;
    box-shadow: 0 0 15px rgba(255, 59, 59, 0.3);
}

.btn-sos-fab:active {
    background: #ff3b3b;
    color: #fff;
    box-shadow: 0 0 30px #ff3b3b;
}

.btn-sos-fab i {
    animation: rotateNuclear 4s linear infinite;
}

@keyframes rotateNuclear {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fab:hover {
    transform: scale(1.1);
}

/* Modal */
.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 300;
    display: flex;
    align-items: flex-end;
    /* Mobile sheet style */
    justify-content: center;
}

.modal-content.glass {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: #1e1e1e;
    border-radius: 24px 24px 0 0;
    padding: 2rem;
    animation: slideUp 0.3s ease-out;
    border-top: 1px solid var(--primary);
}

@media(min-width: 600px) {
    .modal-overlay {
        align-items: center;
    }

    .modal-content.glass {
        border-radius: 24px;
        border: 1px solid var(--primary);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
}

input[type="text"],
textarea {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--primary);
}

/* Location Controls */
.location-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-gps {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-gps:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Category Selector Radio */
.category-selector {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.category-selector input[type="radio"] {
    display: none;
}

.category-selector label {
    flex: 1;
    background: #2a2a2a;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 0;
    /* Override */
}

.category-selector input:checked+label {
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

/* Photo Upload */
.photo-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.photo-upload input[type="file"] {
    display: none;
}
.btn-photo {
    background: rgba(0, 243, 255, 0.1);
    border: 1px dashed var(--primary);
    color: var(--primary);
    padding: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-photo:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--primary);
}
.photo-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    max-height: 180px;
}
.photo-preview img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.btn-remove-photo {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}
.btn-remove-photo:hover {
    background: #ff3b3b;
}

/* Card Photo */
.card-photo {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Galeria de Fotos */
.gallery-mode {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
}
.gallery-card {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 12px;
    gap: 0;
}
.gallery-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.gallery-card:hover .gallery-photo {
    transform: scale(1.05);
}
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 1rem 0.8rem 0.8rem;
    color: #fff;
}
.gallery-overlay h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.gallery-overlay span {
    font-size: 0.7rem;
    opacity: 0.7;
    text-transform: capitalize;
}
.gallery-card .card-actions-row {
    padding: 0.6rem;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}
.gallery-card .card-actions-row .btn-card {
    font-size: 0.75rem;
    padding: 0.5rem;
}

.fuel-price-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
}

/* Trip Planner */
.trip-loc-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}
.trip-loc-select option {
    background: #1e1e1e;
    color: #fff;
}
.trip-add-stop {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.btn-add-stop {
    background: var(--primary, #7c5bfe);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-add-stop:hover {
    filter: brightness(1.2);
}
.trip-stops-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
    min-height: 60px;
}
.trip-stop-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    cursor: grab;
    transition: 0.2s;
    user-select: none;
}
.trip-stop-item:hover {
    background: rgba(255,255,255,0.08);
}
.trip-stop-item.dragging {
    opacity: 0.4;
    border-style: dashed;
}
.trip-stop-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #7c5bfe);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.trip-stop-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
}
.trip-stop-type {
    font-size: 0.7rem;
    opacity: 0.5;
    text-transform: capitalize;
    flex-shrink: 0;
}
.btn-remove-stop {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
    opacity: 0.6;
    transition: 0.2s;
    flex-shrink: 0;
}
.btn-remove-stop:hover {
    opacity: 1;
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: #000;
    font-weight: 700;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1rem;
}

/* Config Modal Styles */
.config-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.config-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-section p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.8rem;
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.theme-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.theme-btn.active {
    border-color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--primary);
}

.theme-cyan {
    background: #00f3ff;
}

.theme-matrix {
    background: #00ff41;
}

.theme-inferno {
    background: #ff3b3b;
}

.theme-stealth {
    background: #bc13fe;
}

/* Switch Toggle (Voice) */
.config-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Checklist Items */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.check-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.check-box-elite {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.check-item span {
    font-size: 0.95rem;
    color: var(--text-main);
}

.config-inputs-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}
.config-inputs-row .input-group-mini {
    flex: 1;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-group-mini {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group-mini label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.input-group-mini input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem;
    color: #fff;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
}

.input-group-mini input:focus {
    border-color: var(--primary);
}

.btn-action {
    flex: 1;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.btn-export {
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-import {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--text-muted);
}

.btn-refresh {
    width: 100%;
    background: rgba(57, 255, 20, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
    flex-direction: row;
    justify-content: center;
}

.version-tag {
    text-align: center;
    font-size: 0.7rem;
    color: #555;
    margin-top: 1rem;
}

/* Distance Badge */
.distance-badge {
    position: absolute;
    top: 1rem;
    right: 7.5rem;
    /* Espaço amplo para botões Editar + Excluir */
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.cost-badge {
    position: absolute;
    top: 3rem;
    right: 1rem;
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 800;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.5rem;
}

.card-tags span {
    font-size: 0.7rem;
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.btn-edit {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

/* Barra de Ordenação */
.sort-bar {
    padding: 0.3rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sort-bar::-webkit-scrollbar { display: none; }
.sort-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.sort-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.sort-btn.active {
    background: rgba(0,243,255,0.12);
    border-color: var(--primary);
    color: var(--primary);
}
.sort-btn:hover { color: var(--text-main); }

/* Active Tracking Bar & Telemetry */
.tracking-bar {
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 2px solid var(--primary);
    padding: 0.8rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    /* Para telas pequenas */
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    position: sticky;
    top: 75px;
    z-index: 90;
    animation: fadeIn 0.3s ease-in;
    gap: 1rem;
}

.tracking-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.telemetry-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.telemetry-item span {
    color: var(--primary);
    font-family: 'Orbitron', monospace;
    /* Se disponível, ou Outfit bold */
    font-weight: 700;
}

.elite-telemetry {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
}

.elite-telemetry span {
    color: var(--accent);
    font-size: 1.1rem;
}

.tracking-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.btn-hud-mini {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-hud-mini:hover {
    background: var(--primary);
    color: #000;
}

.pulse {
    width: 10px;
    height: 10px;
    background: #ff3b3b;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.btn-stop-mini {
    background: #ff3b3b;
    border: none;
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

/* Track Card Specifics */
.track-icon {
    background: rgba(0, 243, 255, 0.1) !important;
}

.track-stats {
    display: flex;
    gap: 1.5rem;
    margin: 0.5rem 0;
}

.track-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-view-track {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Map Modal Specifics */
.map-modal-content {
    height: 85vh;
    display: flex;
    flex-direction: column;
}

#map-container {
    flex: 1;
    width: 100%;
    border-radius: 12px;
    background: #000;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-footer {
    padding: 1rem 0 0;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    text-align: center;
}

.btn-export-img {
    background: var(--primary, #7c5bfe) !important;
    color: #fff !important;
}

.btn-export-gpx {
    background: rgba(57, 255, 20, 0.15) !important;
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
}

.btn-map-loc {
    background: rgba(0, 243, 255, 0.1) !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
}

/* Custom Map Icons */
.map-start-icon i,
.map-end-icon i {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

/* Override Leaflet Dark Colors if needed */
.leaflet-container {
    background-color: #121212 !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #1e1e1e !important;
    color: #fff !important;
    border: 1px solid var(--primary);
}

/* --- TOAST SYSTEM --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid var(--primary);
    border-left: 5px solid var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.2);
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

.toast.success {
    border-color: var(--accent);
    border-left-color: var(--accent);
}

.toast.error {
    border-color: #ff3b3b;
    border-left-color: #ff3b3b;
}

.toast i {
    font-size: 1.2rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.fade-out {
    animation: fadeOutDown 0.3s ease-in forwards;
}

@keyframes fadeOutDown {
    to {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* --- EMPTY STATE REFINEMENT --- */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    opacity: 0.5;
}

.btn-primary-small {
    margin-top: 1.5rem;
    background: var(--primary);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}