/* ==========================================================================
   ESTILO ORIGINAL RESTAURADO - SOS EJE
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #f8fafc;
}

body {
    display: flex;
    flex-direction: column;
}

/* HEADER SUPERIOR (Idéntico a tu imagen) */
.app-header {
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    z-index: 1000;
    position: relative;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-badge {
    background: #fee2e2;
    color: #ef4444;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.brand-text h1 {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.brand-text p {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

.nav-desktop {
    display: flex;
    gap: 0.5rem;
}

.nav-tab {
    background: none;
    border: none;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
}

.nav-tab.active {
    background: #f1f5f9;
    color: #ef4444;
}

/* ÁREA PRINCIPAL Y MAPA (AQUÍ CORREGIMOS EL MAPA A PANTALLA COMPLETA) */
.app-main {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

.modulo {
    display: none;
    width: 100%;
    height: 100%;
}

.modulo.active {
    display: block;
}

#modulo-mapa {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

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

/* CONTAINER PARA LISTA Y FORMULARIO */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1rem 6rem 1rem;
    height: 100%;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
}

.btn-submit {
    width: 100%;
    padding: 0.85rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

/* BARRA INFERIOR MÓVIL (EXACTAMENTE IGUAL A LA FOTO) */
.nav-mobile {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 0.4rem 1rem 0.6rem 1rem;
    z-index: 1000;
    justify-content: space-around;
    align-items: flex-end;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active {
    color: #ef4444;
}

/* EL BOTÓN ROJO REDONDO (+) DE TU FOTO */
.nav-item-add {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.add-icon {
    background: #ef4444;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
    margin-bottom: 0.2rem;
}

@media (min-width: 769px) {
    .nav-mobile {
        display: none;
    }
}
