/* ============================================
   TERREMOTO CARACAS - SISTEMA DE EMERGENCIAS
   Venezuela - 2026
   ============================================ */

:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --secondary: #1d3557;
    --accent: #f4a261;
    --success: #2a9d8f;
    --warning: #e9c46a;
    --danger: #e63946;
    --info: #457b9d;
    --dark: #0d1b2a;
    --light: #f1faee;
    --gray: #6c757d;
    --glass-bg: rgba(13, 27, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0d1b2a 0%, #1d3557 50%, #0d1b2a 100%);
    background-attachment: fixed;
    color: var(--light);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* ===== HEADER ===== */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--light);
}

.logo i {
    color: var(--primary);
    font-size: 1.8rem;
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-menu a {
    color: var(--light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(230, 57, 70, 0.2);
    color: var(--primary);
}

.nav-menu a i {
    font-size: 1.1rem;
}

.emergency-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    border: none;
    padding: 10px 24px !important;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(230, 57, 70, 0);
    }
}

.emergency-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 90px 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== CARDS ===== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(230, 57, 70, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.danger {
    background: rgba(230, 57, 70, 0.2);
    color: var(--primary);
}

.stat-icon.success {
    background: rgba(42, 157, 143, 0.2);
    color: var(--success);
}

.stat-icon.warning {
    background: rgba(233, 196, 106, 0.2);
    color: var(--warning);
}

.stat-icon.info {
    background: rgba(69, 123, 157, 0.2);
    color: var(--info);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== GRID LAYOUTS ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ===== MAPA ===== */
.map-container {
    height: 450px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: #1a1a2e;
}

.map-container iframe,
.map-container #map {
    width: 100%;
    height: 100%;
    border: none;
}

.map-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    max-width: 300px;
}

.map-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.refugio {
    background: var(--primary);
}

.legend-dot.hospital {
    background: var(--success);
}

.legend-dot.comedor {
    background: var(--warning);
}

.legend-dot.punto {
    background: var(--info);
}

/* ===== TABLAS ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: rgba(230, 57, 70, 0.15);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-desaparecido {
    background: rgba(230, 57, 70, 0.2);
    color: var(--primary);
}

.badge-localizado {
    background: rgba(42, 157, 143, 0.2);
    color: var(--success);
}

.badge-herido {
    background: rgba(233, 196, 106, 0.2);
    color: var(--warning);
}

.badge-rescatado {
    background: rgba(69, 123, 157, 0.2);
    color: var(--info);
}

.badge-fallecido {
    background: rgba(108, 117, 125, 0.25);
    color: #adb5bd;
}

.badge-activo {
    background: rgba(42, 157, 143, 0.2);
    color: var(--success);
}

.badge-inactivo {
    background: rgba(108, 117, 125, 0.2);
    color: var(--gray);
}

.badge-urgente {
    background: rgba(230, 57, 70, 0.2);
    color: var(--primary);
    animation: blink 1s infinite;
}

.badge-alerta {
    background: rgba(233, 196, 106, 0.2);
    color: var(--warning);
}

.badge-info {
    background: rgba(69, 123, 157, 0.2);
    color: var(--info);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #21867a);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(42, 157, 143, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d4a373);
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--light);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
}

/* ===== FORMULARIOS ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--light);
}

.form-label .required {
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--light);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select.form-control option {
    background: var(--dark);
    color: var(--light);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.form-check:hover {
    background: rgba(255, 255, 255, 0.05);
}

.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    transform: scale(0.9);
    transition: transform 0.3s;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    z-index: 10;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(230, 57, 70, 0.2);
    color: var(--primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
}

/* ===== NOTIFICACIONES ===== */
.notification-item {
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 4px solid;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.notification-item.urgente {
    border-left-color: var(--primary);
}

.notification-item.alerta {
    border-left-color: var(--warning);
}

.notification-item.informacion {
    border-left-color: var(--info);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--gray);
}

.notification-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* ===== CENTROS DE ACOPIO CARDS ===== */
.centro-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.centro-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(230, 57, 70, 0.3);
}

.centro-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.centro-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.centro-type.refugio {
    background: rgba(230, 57, 70, 0.2);
    color: var(--primary);
}

.centro-type.hospital {
    background: rgba(42, 157, 143, 0.2);
    color: var(--success);
}

.centro-type.comedor {
    background: rgba(233, 196, 106, 0.2);
    color: var(--warning);
}

.centro-type.punto_encuentro {
    background: rgba(69, 123, 157, 0.2);
    color: var(--info);
}

.centro-type.plaza {
    background: rgba(164, 110, 202, 0.2);
    color: #a46eca;
}

.centro-type.otro {
    background: rgba(108, 117, 125, 0.2);
    color: var(--gray);
}

.centro-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.centro-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.centro-info i {
    width: 18px;
    color: var(--primary);
}

.centro-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1rem;
}

.service-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.8rem;
}

.service-tag.active {
    background: rgba(42, 157, 143, 0.2);
    color: var(--success);
}

.service-tag.inactive {
    background: rgba(108, 117, 125, 0.1);
    color: var(--gray);
    text-decoration: line-through;
    opacity: 0.6;
}

.centro-capacity {
    margin-bottom: 1rem;
}

.capacity-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.capacity-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.capacity-fill.low {
    background: var(--success);
}

.capacity-fill.medium {
    background: var(--warning);
}

.capacity-fill.high {
    background: var(--primary);
}

.capacity-text {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    justify-content: space-between;
}

/* ===== RECURSOS ===== */
.recurso-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.recurso-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.recurso-name i {
    color: var(--primary);
}

.recurso-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recurso-bar {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.recurso-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--success);
}

.recurso-count {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

/* ===== BUSCADOR ===== */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 14px 14px 14px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--light);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
}

/* ===== FILTROS ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== PERSONA CARD ===== */
.persona-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.persona-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(230, 57, 70, 0.3);
}

.persona-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

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

.persona-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.persona-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray);
}

.persona-meta i {
    color: var(--primary);
}

.persona-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* ===== ALERTA EMERGENCIA ===== */
.emergency-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 1rem 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    animation: pulse 2s infinite;
}

.emergency-banner h2 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.emergency-banner p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* ===== LOCATION PICKER ===== */
.location-picker {
    position: relative;
}

.lp-search-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.lp-search-wrapper > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
    z-index: 1;
}

.lp-search {
    padding-left: 42px !important;
}

.lp-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0d1b2a;
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 5000;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.lp-suggestion-item {
    padding: 10px 14px;
    font-size: 0.86rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--light);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
    transition: background 0.15s;
}

.lp-suggestion-item:last-child { border-bottom: none; }

.lp-suggestion-item:hover {
    background: rgba(230, 57, 70, 0.15);
    color: var(--primary);
}

.lp-suggestion-item i {
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.lp-suggestion-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lp-map {
    height: 260px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #1a1a2e;
}

.lp-display {
    font-size: 0.82rem;
    color: var(--gray);
    margin-top: 0.5rem;
    text-align: center;
    padding: 4px 8px;
    min-height: 22px;
}

.lp-display.has-location {
    color: var(--success);
}

.lp-searching {
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    color: var(--gray);
}

.lp-confirm-panel {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(230, 57, 70, 0.07);
    border: 1px solid rgba(230, 57, 70, 0.25);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    flex-wrap: wrap;
    animation: fadeIn 0.2s ease;
}

.lp-confirm-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--light);
    flex: 1;
    min-width: 0;
}

.lp-confirm-info i {
    color: var(--primary);
    flex-shrink: 0;
}

.lp-confirm-coords {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-filled-fields {
    background: rgba(42, 157, 143, 0.07);
    border: 1px solid rgba(42, 157, 143, 0.2);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--success);
    display: none;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .lp-confirm-panel { flex-direction: column; align-items: flex-start; }
    .lp-confirm-panel .btn { width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
    .lp-map { height: 200px; }
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    order: 3;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

/* ===== LOADER SPINNER ===== */
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== BTN INFO ===== */
.btn-info {
    background: linear-gradient(135deg, var(--info), #2c5f7a);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(69, 123, 157, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-header {
        padding: 0 1rem;
        height: 60px;
        flex-wrap: nowrap;
        position: fixed;
    }

    .main-header .logo {
        font-size: 1.1rem;
        flex: 1;
    }

    .main-header nav {
        display: none;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(13, 27, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        gap: 4px;
        z-index: 999;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 8px;
        width: 100%;
    }

    .nav-menu a span {
        display: inline;
    }

    /* Mostrar nav en mobile cuando el hamburger está activo */
    .main-header nav.open {
        display: block;
    }

    .main-content {
        padding: 80px 0.75rem 1.5rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.875rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .stat-info h3 {
        font-size: 1.6rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius) var(--radius) 0 0;
        margin: 0;
    }

    .emergency-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .emergency-banner h2 {
        font-size: 0.95rem;
    }

    .filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .persona-card {
        flex-direction: column;
    }

    .persona-status {
        align-items: flex-start;
        flex-direction: row;
        gap: 1rem;
    }

    /* Tablas responsive: scroll horizontal */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 550px;
    }

    th, td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .card {
        padding: 1rem;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .map-container {
        height: 300px !important;
    }

    .centro-card {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .recurso-bar {
        width: 70px;
    }

    .recurso-count {
        min-width: 60px;
        font-size: 0.8rem;
    }
}

@media (max-width: 420px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .stat-info h3 {
        font-size: 1.4rem;
    }

    .stat-info p {
        font-size: 0.8rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

/* ===== LOADING ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

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

.toast.error {
    border-left-color: var(--primary);
}

.toast.warning {
    border-left-color: var(--warning);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* ===== MAP MARKERS ===== */
.map-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}

.map-marker:hover {
    transform: scale(1.3);
    z-index: 20;
}

.map-marker.refugio {
    background: var(--primary);
}

.map-marker.hospital {
    background: var(--success);
}

.map-marker.comedor {
    background: var(--warning);
}

.map-marker.punto {
    background: var(--info);
}

.map-marker::after {
    content: attr(data-name);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 6px;
}

.map-marker:hover::after {
    opacity: 1;
}

/* ===== SECCIONES ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1px;
}

.tab {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
}

.tab:hover {
    color: var(--light);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== NEED TAGS (estado de necesidades) ===== */
.centro-needs-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.need-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.need-tag.pending {
    background: rgba(230, 57, 70, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.need-tag.covered {
    background: rgba(42, 157, 143, 0.1);
    color: #2a9d8f;
    border: 1px solid rgba(42, 157, 143, 0.25);
    opacity: 0.7;
}

/* ===== ADMIN PANEL ===== */
.admin-centro-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary);
}

.admin-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-card-header h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.admin-card-header p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--gray);
}

.admin-needs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.need-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.18s ease;
    position: relative;
}

.need-toggle-btn.still-needed {
    background: rgba(230, 57, 70, 0.12);
    color: #ff6b6b;
    border: 1.5px solid rgba(230, 57, 70, 0.35);
}

.need-toggle-btn.still-needed:hover {
    background: rgba(230, 57, 70, 0.22);
}

.need-toggle-btn.now-covered {
    background: rgba(42, 157, 143, 0.12);
    color: #2a9d8f;
    border: 1.5px solid rgba(42, 157, 143, 0.35);
}

.need-toggle-btn.now-covered:hover {
    background: rgba(42, 157, 143, 0.22);
}

.need-toggle-btn .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.still-needed .dot { background: #ff6b6b; }
.now-covered .dot  { background: #2a9d8f; }

.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-login-card {
    width: 100%;
    max-width: 380px;
    padding: 2rem;
}

.admin-login-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.6rem;
    color: white;
}

@media (max-width: 768px) {
    .admin-needs-grid { gap: 0.5rem; }
    .need-toggle-btn { font-size: 0.78rem; padding: 6px 12px; }
}

/* ── Avisos de Ayuda ─────────────────────────────────────── */
.aviso-tipo-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.aviso-tipo-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--gray);
    font-size: 0.83rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.aviso-tipo-btn:hover,
.aviso-tipo-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(230,57,70,0.08);
}

/* Tarjeta de aviso */
.aviso-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--aviso-color, var(--primary));
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}
.aviso-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.aviso-card.aviso-urgente {
    animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
    0%, 100% { border-left-color: var(--aviso-color, var(--primary)); }
    50%       { border-left-color: rgba(230,57,70,0.3); }
}
.aviso-card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}
.aviso-tipo-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.aviso-titulo {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}
.aviso-tipo-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.aviso-desc {
    font-size: 0.88rem;
    color: var(--gray);
    margin: 0 0 0.6rem;
    line-height: 1.6;
}
.aviso-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Selector de tipo en el modal */
.aviso-tipo-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
}
.aviso-tipo-opt {
    cursor: pointer;
}
.aviso-tipo-opt input {
    display: none;
}
.ato-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    border: 1.5px solid var(--glass-border);
    background: var(--glass-bg);
    font-size: 0.82rem;
    text-align: center;
    transition: var(--transition);
    color: var(--gray);
}
.ato-inner i {
    font-size: 1.3rem;
    color: var(--ato-color);
}
.aviso-tipo-opt.selected .ato-inner {
    border-color: var(--ato-color);
    background: color-mix(in srgb, var(--ato-color) 12%, transparent);
    color: var(--ato-color);
}

@media (max-width: 480px) {
    .aviso-tipo-selector { grid-template-columns: repeat(3, 1fr); }
    .aviso-tipo-bar { gap: 0.35rem; }
    .aviso-tipo-btn { font-size: 0.75rem; padding: 5px 10px; }
}

/* ── Área de carga de foto ───────────────────────────────── */
.foto-upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255,255,255,0.02);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.foto-upload-area:hover {
    border-color: var(--primary);
    background: rgba(230,57,70,0.05);
}
.foto-upload-area #fotoPlaceholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--gray);
}

/* ── Estado persona — sección destacada en formulario ─────── */
.estado-persona-top {
    background: linear-gradient(135deg, rgba(230,57,70,0.12), rgba(230,57,70,0.05));
    border: 1px solid rgba(230,57,70,0.3);
    border-radius: var(--radius);
    padding: 1.25rem 1.25rem 1rem;
    margin-bottom: 1.25rem;
}
.estado-persona-top .ep-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.estado-persona-top .ep-hint {
    font-size: 0.82rem;
    color: var(--gray);
    margin: 0 0 0.75rem;
}
.estado-persona-top select.form-control {
    font-size: 1.05rem;
    font-weight: 600;
    border-color: rgba(230,57,70,0.4);
}
.estado-persona-top select.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230,57,70,0.18);
}

/* ── Sección cambio de estado (modal ver persona) ─────────── */
.estado-change-section {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}
.estado-change-section .ec-title {
    font-size: 0.78rem;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}
.confirm-estado-panel {
    margin-top: 0.75rem;
    background: rgba(230,126,34,0.1);
    border: 1px solid rgba(230,126,34,0.35);
    border-radius: 10px;
    padding: 0.875rem 1rem;
}
.confirm-estado-panel .cep-warning {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.confirm-estado-panel .cep-warning i {
    color: #e67e22;
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.confirm-estado-panel .cep-text strong {
    display: block;
    color: #e67e22;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}
.confirm-estado-panel .cep-text span {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
}
.confirm-estado-panel .cep-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}