/* Sort Bar */
.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-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); }

/* Tracking Bar */
.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;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    position: sticky;
    top: 52px;
    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-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;
}

.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;
}

/* 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;
}

.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;
}

.fab:hover {
    transform: scale(1.1);
}

/* Map Modal */
.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);
    color: #fff;
}

.btn-export-gpx {
    background: rgba(57, 255, 20, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-map-loc {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.map-start-icon i,
.map-end-icon i {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.leaflet-container {
    background-color: #121212 !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #1e1e1e !important;
    color: #fff !important;
    border: 1px solid var(--primary);
}

/* Dashboard */
.dashboard-container {
    animation: fadeInUp 0.4s ease-out;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 0;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.db-stat-card {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(0, 243, 255, 0.15);
    border-radius: 16px;
    padding: 1.2rem;
    backdrop-filter: blur(12px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.db-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 243, 255, 0.08), transparent 70%);
    pointer-events: none;
}

.db-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 243, 255, 0.15);
}

.db-stat-card > i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
    filter: drop-shadow(0 0 6px var(--primary));
}

.db-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.db-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.dashboard-chart-section {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(0, 243, 255, 0.12);
    border-radius: 18px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    backdrop-filter: blur(16px);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.chart-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-header select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(0,243,255,0.25);
    border-radius: 8px;
    color: #fff;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    cursor: pointer;
    outline: none;
}

.chart-wrapper {
    position: relative;
}

#telemetry-chart {
    display: block;
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
}

.chart-legend {
    display: flex;
    gap: 1.2rem;
    margin-top: 0.6rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 3px;
    border-radius: 2px;
}

.legend-speed .legend-dot { background: var(--primary); }
.legend-altitude .legend-dot { background: var(--accent); border-top: 1px dashed var(--accent); }

.dashboard-categories-section {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(0, 243, 255, 0.12);
    border-radius: 18px;
    padding: 1.2rem;
    backdrop-filter: blur(16px);
}

.dashboard-categories-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.db-categories-distribution {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.db-cat-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.db-cat-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.db-cat-name {
    flex: 1;
    color: var(--text-main);
}

.db-cat-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.db-cat-bar-wrap {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.db-cat-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

/* Category Manager */
.category-manager-section {
    border-top: 1px solid rgba(0,243,255,0.1);
    margin-top: 0.5rem;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.cat-item-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-item-badge .btn-delete-cat {
    background: none;
    border: none;
    color: #ff3b3b;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.category-form-inline {
    margin-top: 0.8rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 0.8rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.color-selector-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}

.color-badge-opt {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-badge-opt.active {
    border-color: #fff;
    transform: scale(1.2);
}

.color-badge-opt:hover {
    transform: scale(1.1);
}

.icon-selector-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}

.icon-badge-opt {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.icon-badge-opt.active {
    background: rgba(0,243,255,0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.icon-badge-opt:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-add-category-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem 1rem;
    background: rgba(0, 243, 255, 0.12);
    border: 1px solid rgba(0, 243, 255, 0.35);
    border-radius: 10px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-category-action:hover {
    background: rgba(0, 243, 255, 0.22);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.2);
    color: #fff;
}

/* Category Selector */
.category-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-selector input[type="radio"] {
    display: none;
}

.category-selector label {
    margin-bottom: 0;
    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;
}

.category-selector input:checked+label {
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

/* Config Modal */
.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 {
    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; }
.theme-amoled { background: #00ff88; box-shadow: 0 0 12px rgba(0,255,136,0.4); }

.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);
}

.config-inputs-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.config-inputs-stack .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;
}

/* Checklist Modal */
.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);
}

/* 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;
}

/* Cost Calculator */
.cost-result {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.cost-header {
    text-align: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cost-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.cost-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.cost-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.cost-item {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cost-item i {
    font-size: 1.1rem;
    color: var(--primary);
}

.cost-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.cost-breakdown {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 0.4rem 0;
    color: var(--text-muted);
}

.cost-amount {
    font-weight: 700;
    color: var(--text-main);
}

.cost-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.3rem 0;
}

.cost-row.cost-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.cost-row.cost-total .cost-amount {
    font-size: 1.2rem;
    color: var(--accent);
}

.cost-segments {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cost-segments-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.cost-segment {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
}

.cost-seg-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cost-seg-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.cost-seg-route {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cost-seg-dist {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.cost-disclaimer {
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.5;
    text-align: center;
    margin-top: 0;
}

.btn-cost {
    background: linear-gradient(135deg, #ffd700, #f0a030);
    color: #000;
    font-weight: 800;
}

/* Buttons */
.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);
}

.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);
}

.btn-snapshot-restore,
.btn-snapshot-delete {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-snapshot-restore {
    color: var(--primary);
}

.btn-snapshot-restore:hover {
    background: rgba(0,243,255,0.1);
}

.btn-snapshot-delete {
    color: #ff3b3b;
    opacity: 0.5;
}

.btn-snapshot-delete:hover {
    opacity: 1;
    background: rgba(255,59,59,0.1);
}

.btn-sync {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

#sync-status {
    word-break: break-all;
    line-height: 1.4;
}

/* Version Tag */
.version-tag {
    text-align: center;
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 6px var(--primary);
    opacity: 0.9;
}

/* Premium Effects */
.badge-ring {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3), 0 0 60px rgba(57, 255, 20, 0.1);
    animation: badgePulse 3s ease-in-out infinite;
    flex-shrink: 0;
    padding: 6px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(300px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(0, 243, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.card:hover::before {
    opacity: 1;
}

.card-header, .card-title, .card-subtitle, .card-notes, .card-tags, .card-actions-row, .distance-badge, .cost-badge, .fuel-price-badge {
    position: relative;
    z-index: 2;
}

/* Utility Bar */
.utility-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1rem;
    position: relative;
}

.utility-bar::before,
.utility-bar::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,243,255,0.18), transparent);
    pointer-events: none;
}

.utility-bar::before { top: 0; }
.utility-bar::after  { bottom: 0; }

.utility-bar-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.4rem;
    border-radius: 100px;
    background: rgba(12, 14, 26, 0.82);
    border: 1px solid rgba(0, 243, 255, 0.28);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 2px 28px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 40px rgba(0, 243, 255, 0.06);
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.45rem;
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
}

.utility-bar-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,243,255,0.5), transparent);
    pointer-events: none;
}

.utility-bar-inner:hover {
    border-color: rgba(0, 243, 255, 0.55);
    box-shadow:
        0 4px 36px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 0 60px rgba(0, 243, 255, 0.12);
}

.utility-section {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.util-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(0, 243, 255, 0.55);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    padding-right: 0.45rem;
    border-right: 1px solid rgba(0, 243, 255, 0.18);
    height: 1.5rem;
}

.util-section-label i {
    font-size: 0.7rem;
}

.util-btns {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.util-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.82rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.util-btn i {
    font-size: 0.78rem;
    transition: transform 0.2s ease;
}

.util-btn:hover {
    color: #fff;
    border-color: rgba(0, 243, 255, 0.45);
    background: rgba(0, 243, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 243, 255, 0.18);
}

.util-btn:hover i { transform: scale(1.15); }
.util-btn:active { transform: translateY(0); box-shadow: none; }

.util-btn.active {
    background: linear-gradient(135deg, rgba(0,243,255,0.2), rgba(0,243,255,0.08));
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 14px rgba(0, 243, 255, 0.22), inset 0 1px 0 rgba(0,243,255,0.15);
    font-weight: 600;
}

.util-btn.active i { filter: drop-shadow(0 0 5px var(--primary)); }

.util-btn-accent {
    background: rgba(0, 243, 255, 0.1);
    border-color: rgba(0, 243, 255, 0.38);
    color: var(--primary);
    font-weight: 600;
    padding: 0.35rem 1rem;
}

.util-btn-accent:hover {
    background: rgba(0, 243, 255, 0.22);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4), inset 0 0 12px rgba(0,243,255,0.08);
    color: #fff;
    transform: translateY(-2px);
}

.util-btn-info {
    background: rgba(57, 255, 20, 0.07);
    border-color: rgba(57, 255, 20, 0.28);
    color: var(--accent);
    font-weight: 600;
    padding: 0.35rem 1rem;
}

.util-btn-info:hover {
    background: rgba(57, 255, 20, 0.16);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

.util-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 243, 255, 0.4),
        transparent
    );
    flex-shrink: 0;
    align-self: center;
    margin: 0 0.15rem;
}

.util-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.util-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.util-btn-icon:hover {
    background: rgba(0, 243, 255, 0.12);
    border-color: rgba(0, 243, 255, 0.3);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 243, 255, 0.15);
}

.util-btn-icon:active {
    transform: scale(0.9);
}

.util-btn-icon i {
    transition: transform 0.2s ease;
}

.util-btn-icon:hover i {
    transform: scale(1.15);
}

/* Auto Backups */
.auto-backups-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Responsive: Utility Bar */
@media (max-width: 640px) {
    .utility-bar {
        padding: 0.4rem 0.6rem;
    }

    .utility-bar-inner {
        padding: 0.5rem 0.9rem;
        border-radius: 20px;
        gap: 0.5rem;
    }

    .util-divider {
        width: 100%;
        height: 1px;
        background: linear-gradient(
            to right,
            transparent,
            rgba(0, 243, 255, 0.3),
            transparent
        );
    }

    .util-section-label {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 0.2rem;
        height: auto;
        width: 100%;
        margin-bottom: 0.2rem;
    }

    .util-btn {
        font-size: 0.75rem;
        padding: 0.32rem 0.7rem;
    }

    .util-nav {
        width: 100%;
        justify-content: center;
    }
}

/* ===== QR CODE ===== */
.btn-qr {
    background: rgba(188, 19, 254, 0.12) !important;
    border-color: rgba(188, 19, 254, 0.25) !important;
    color: #bc13fe !important;
}

.btn-qr:hover {
    background: rgba(188, 19, 254, 0.25) !important;
}

.qr-modal-content {
    text-align: center;
    padding: 2rem !important;
}

.qr-modal-content img {
    max-width: 100%;
    width: 220px;
    height: 220px;
    image-rendering: pixelated;
    animation: qrPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 16px;
    background: #fff;
    padding: 12px;
}

.qr-modal-label {
    display: block;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.qr-modal-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.btn-qr-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-qr-action:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== GOOGLE MAPS ===== */
.btn-gmaps {
    background: rgba(66, 133, 244, 0.12) !important;
    border-color: rgba(66, 133, 244, 0.25) !important;
    color: #4285f4 !important;
}

.btn-gmaps:hover {
    background: rgba(66, 133, 244, 0.25) !important;
}

/* Card hover enhancement */
.card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.gallery-card .card-actions-row {
    margin-top: 0;
    padding: 0.5rem;
}
