/* ══════════════════════════════════════════════════════════ */
/* Fecha: 2026-02-14                                        */
/* Ruta: /var/www/mapfix/public/css/styles.css               */
/* Servicio: MapFix — Estilos principales                    */
/* Descripción: Layout fullscreen con paneles slide-in       */
/*              Los colores vienen de theme-dark/loxone.css   */
/* ══════════════════════════════════════════════════════════ */

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    transition: background 0.3s, color 0.3s;
}

/* ══════════════════════════════════════════════
   LAYOUT — FULLSCREEN MAP
   ══════════════════════════════════════════════ */

.app {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* ══════════════════════════════════════════════
   TOP BAR — FLOATING OVERLAY
   ══════════════════════════════════════════════ */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    transition: background 0.3s, border-color 0.3s;
    box-shadow: var(--shadow-md);
}

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

.topbar-brand .logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), #437B33);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.topbar-brand h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.topbar-brand h1 span {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 8px;
    font-size: 13px;
}

/* Hamburger button */
.sidebar-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-right: 4px;
}

.sidebar-toggle:hover { background: var(--bg-card-hover); }

.topbar-stats {
    display: flex;
    gap: 16px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    transition: background 0.3s;
}

.stat-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stat-pill.critical { background: var(--red-bg); color: var(--red); }
.stat-pill.critical .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.stat-pill.pending { background: var(--orange-bg); color: var(--orange); }
.stat-pill.pending .dot { background: var(--orange); }
.stat-pill.progress { background: var(--blue-bg); color: var(--blue); }
.stat-pill.progress .dot { background: var(--blue); }
.stat-pill.resolved { background: var(--green-bg); color: var(--green); }
.stat-pill.resolved .dot { background: var(--green); }

.topbar-actions {
    display: flex;
    gap: 8px;
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn:hover { background: var(--bg-card-hover); box-shadow: var(--shadow-sm); }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* Theme toggle */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover { background: var(--bg-card-hover); }

/* ══════════════════════════════════════════════
   MAP — FULLSCREEN
   ══════════════════════════════════════════════ */

.map-container {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.leaflet-container {
    background: var(--bg-primary);
}

/* Desplazar controles de zoom para no tapar topbar */
.leaflet-top.leaflet-right {
    top: 64px;
}

/* Custom markers */
.custom-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    color: white;
    border: 3px solid var(--marker-border);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
}

.custom-marker:hover { transform: scale(1.2); }

.marker-ok { background: var(--green); }
.marker-warning { background: var(--orange); }
.marker-critical { background: var(--red); animation: pulse-marker 2s infinite; }
.marker-progress { background: var(--blue); }

@keyframes pulse-marker {
    0%, 100% { box-shadow: 0 2px 12px rgba(0,0,0,0.4); }
    50% { box-shadow: 0 2px 12px rgba(255, 90, 90, 0.6), 0 0 20px rgba(255, 90, 90, 0.3); }
}

/* Leaflet popups */
.leaflet-popup-content-wrapper {
    background: var(--popup-bg) !important;
    border: 1px solid var(--popup-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text-primary) !important;
}

.leaflet-popup-tip {
    background: var(--popup-bg) !important;
    border: 1px solid var(--popup-border) !important;
}

.popup-content h3 { font-size: 15px; margin-bottom: 4px; }
.popup-content .popup-addr { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.popup-content .popup-incidents { font-size: 12px; display: flex; gap: 8px; }

.popup-content .popup-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
}

.map-overlay-legend {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    z-index: 1000;
    display: flex;
    gap: 14px;
    font-size: 12px;
    box-shadow: var(--shadow-md);
    transition: background 0.3s, border-color 0.3s;
}

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

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

/* ══════════════════════════════════════════════
   SIDEBAR — SLIDE-IN FROM LEFT
   ══════════════════════════════════════════════ */

.sidebar {
    position: absolute;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 340px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 900;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s, border-color 0.3s;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sidebar-header-top h2 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.panel-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.panel-close:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.search-box {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, background 0.3s;
}

.search-box:focus { border-color: var(--accent); }
.search-box::placeholder { color: var(--text-muted); }

.filter-tabs {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.filter-tab {
    flex: 1;
    padding: 6px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.filter-tab:hover { color: var(--text-secondary); background: var(--bg-card); }
.filter-tab.active { background: var(--bg-card); color: var(--text-primary); }

/* ══════════════════════════════════════════════
   INCIDENT LIST
   ══════════════════════════════════════════════ */

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

.incident-list::-webkit-scrollbar { width: 4px; }
.incident-list::-webkit-scrollbar-track { background: transparent; }
.incident-list::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

.incident-card {
    padding: 14px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid transparent;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.incident-card:hover { background: var(--bg-card-hover); border-color: var(--border); }

.incident-card.active {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 1px var(--accent), 0 4px 16px var(--accent-glow);
}

.incident-card .priority-bar {
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
}

.incident-card .priority-bar.critical { background: var(--red); }
.incident-card .priority-bar.high { background: var(--orange); }
.incident-card .priority-bar.medium { background: var(--yellow); }
.incident-card .priority-bar.low { background: var(--green); }

.incident-card .ic-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    padding-left: 8px;
}

.incident-card .ic-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

.incident-card .ic-status {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ic-status.abierta { background: var(--red-bg); color: var(--red); }
.ic-status.pendiente { background: var(--orange-bg); color: var(--orange); }
.ic-status.en-curso { background: var(--blue-bg); color: var(--blue); }
.ic-status.resuelta { background: var(--green-bg); color: var(--green); }

.incident-card .ic-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    padding-left: 8px;
    line-height: 1.3;
}

.incident-card .ic-villa {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.incident-card .ic-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-left: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   DETAIL PANEL — SLIDE-IN FROM RIGHT
   ══════════════════════════════════════════════ */

.detail-panel {
    position: absolute;
    top: 56px;
    right: 0;
    bottom: 0;
    width: 600px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 900;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s, border-color 0.3s;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}

.detail-panel.open {
    transform: translateX(0);
}

.detail-panel.empty {
    /* Ya no se muestra por defecto — solo cuando no hay selección y el panel está abierto */
}

.detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    color: var(--text-muted);
}

.detail-empty .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.detail-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.detail-header .dh-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.detail-header .dh-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.detail-header h2 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.detail-header .dh-villa {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

.detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.detail-body::-webkit-scrollbar { width: 4px; }
.detail-body::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.meta-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    transition: background 0.3s;
}

.meta-item .label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.meta-item .value {
    font-size: 13px;
    font-weight: 600;
}

.detail-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Photos */
.detail-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.photo-thumb {
    aspect-ratio: 4/3;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: border-color 0.2s;
    overflow: hidden;
    position: relative;
}

.photo-thumb:hover { border-color: var(--accent); }
.photo-delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    opacity: 0.9;
    transition: all 0.2s;
}
.photo-delete-btn:hover {
    opacity: 1;
    transform: scale(1.15);
    background: #dc2626;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb .exif-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 16px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -19px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg-secondary);
}

.timeline-item.active::before { background: var(--accent); }

.timeline-item .tl-time {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2px;
}

.timeline-item .tl-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.timeline-item .tl-user {
    font-weight: 600;
    color: var(--text-primary);
}

/* Detail actions */
.detail-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.detail-actions .btn { flex: 1; justify-content: center; }

/* ══════════════════════════════════════════════
   BACKDROP — Clic fuera cierra paneles
   ══════════════════════════════════════════════ */

.panel-backdrop {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 800;
    background: transparent;
}

.panel-backdrop.active {
    display: block;
}

/* ══════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--modal-backdrop);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 { font-size: 16px; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 24px; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, background 0.3s;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.photo-upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-size: 13px;
}

.photo-upload-area:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.photo-upload-area .upload-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.gps-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--green-bg);
    border-radius: 6px;
    font-size: 12px;
    color: var(--green);
    font-weight: 500;
    margin-top: 8px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

.show-mobile { display: none; }
.hide-mobile { display: inline; }

.show-mobile { display: none; }
.hide-mobile { display: inline; }

@media (max-width: 768px) {
    .show-mobile { display: inline !important; }
    .hide-mobile { display: none !important; }
    .show-mobile { display: inline !important; }
    .hide-mobile { display: none !important; }
    .topbar-stats { display: none !important; }
    .topbar-brand h1 { font-size: 14px; }
    .topbar-brand h1 span { display: none; }
    .topbar-brand .logo { width: 28px; height: 28px; font-size: 16px; }
    .topbar { flex-wrap: nowrap; padding: 4px 8px; gap: 4px; height: 44px; }
    .topbar-actions { width: auto; justify-content: flex-end; gap: 4px; }
    .topbar-actions .btn-primary { font-size: 11px; padding: 5px 8px; display: inline-flex !important; }
    .topbar-actions .btn { font-size: 11px; padding: 4px 8px; }
    .topbar-actions .theme-toggle { display: none !important; }
    #btnGpsHistory { display: none !important; }
    #userInfo { display: inline !important; font-size: 10px !important; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .map-container { top: 44px; }

    .sidebar {
        width: 100%;
        box-shadow: none;
    }

    .detail-panel {
        width: 100%;
        box-shadow: none;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .topbar-stats { gap: 8px; }
    .stat-pill { padding: 4px 10px; font-size: 11px; }

    .sidebar { width: 300px; }
    .detail-panel { width: 500px; }
}

/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.incident-card { animation: fadeIn 0.3s ease both; }
.incident-card:nth-child(2) { animation-delay: 0.05s; }
.incident-card:nth-child(3) { animation-delay: 0.1s; }
.incident-card:nth-child(4) { animation-delay: 0.15s; }
.incident-card:nth-child(5) { animation-delay: 0.2s; }
/* ══════════════════════════════════════════════
   MARCADORES — ESTADOS × PRIORIDAD
   Añadido: 2026-03-04
   ══════════════════════════════════════════════ */

/* Wrapper para centrar aura + círculo */
.marker-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Colores por estado */
.marker-estado-abierta   { background: var(--blue); }
.marker-estado-pendiente { background: var(--blue); }
.marker-estado-encurso   { background: var(--orange); }
.marker-estado-resuelta  { background: var(--green); }

/* Aura de prioridad */
.marker-aura {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.marker-aura-critical {
    border: 2.5px solid #ef4444;
    animation: aura-pulse-critical 1.4s ease-in-out infinite;
}

.marker-aura-medium {
    border: 2px solid rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
    animation: aura-breathe-medium 3s ease-in-out infinite;
}

@keyframes aura-pulse-critical {
    0%   { transform: translate(-50%,-50%) scale(1);    box-shadow: 0 0 0 0px rgba(239,68,68,0.55); border-color: rgba(239,68,68,1); }
    50%  { transform: translate(-50%,-50%) scale(1.2);  box-shadow: 0 0 0 6px rgba(239,68,68,0);   border-color: rgba(239,68,68,0.3); }
    100% { transform: translate(-50%,-50%) scale(1);    box-shadow: 0 0 0 0px rgba(239,68,68,0);   border-color: rgba(239,68,68,1); }
}

@keyframes aura-breathe-medium {
    0%, 100% { box-shadow: 0 0 6px rgba(139,92,246,0.25); }
    50%       { box-shadow: 0 0 16px rgba(139,92,246,0.55); }
}

/* Botón técnico en panel de detalle */
.btn-tecnico-recibida {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: var(--blue);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    justify-content: center;
    transition: opacity 0.2s;
}

.btn-tecnico-resuelta {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: var(--green);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    justify-content: center;
    transition: opacity 0.2s;
}

.btn-tecnico-recibida:hover,
.btn-tecnico-resuelta:hover { opacity: 0.85; }

.tecnico-pendiente-cierre {
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: #10b981;
    font-size: 13px;
}

/* Fix z-index marcador sobre aura */
.marker-wrap .custom-marker {
    position: relative;
    z-index: 2;
}

/* ── Mini-cards selector de incidencias ── */
.minicard {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 8px;
}
.minicard:hover {
    border-color: var(--accent);
    background: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.minicard:active { transform: translateY(0); }
.minicard-status {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.minicard-status.abierta, .minicard-status.pendiente { background: #3b82f6; }
.minicard-status.en-curso { background: #f59e0b; }
.minicard-status.resuelta { background: #10b981; }
.minicard-info { flex: 1; min-width: 0; }
.minicard-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.minicard-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.minicard-priority {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.minicard-priority.critical { background: var(--red-bg); color: var(--red); }
.minicard-priority.high { background: var(--orange-bg); color: var(--orange); }
.minicard-priority.medium { background: #fef3c7; color: #d97706; }
.minicard-priority.low { background: var(--green-bg); color: var(--green); }
