/* Reset básico y tipografía */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

header {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.buscador {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.buscador input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    transition: border 0.3s;
}

.buscador input:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52,152,219,0.5);
}

/* Listado de tarjetas */
.lista-residencias {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.tarjeta {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
    width: 300px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tarjeta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.tarjeta h2 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.8rem;
}

.tarjeta p {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.btn-ver {
    display: inline-block;
    margin-top: 1rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-ver:hover {
    background: #2980b9;
}

/* Tarjeta oculta para el filtro JS */
.tarjeta.oculta {
    display: none;
}

footer {
    text-align: center;
    padding: 1rem;
    background: #ecf0f1;
    color: #7f8c8d;
    margin-top: 3rem;
}

/* Responsivo */
@media (max-width: 600px) {
    .tarjeta {
        width: 100%;
    }
}

/* Estilos para formularios de login/registro */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-container label {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
}

.form-container input {
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-container button {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: 1.5rem;
    font-size: 1rem;
    cursor: pointer;
}

.form-container button:hover {
    background: #2980b9;
}

.mensaje {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.mensaje.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensaje.exito {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-container p {
    text-align: center;
    margin-top: 1rem;
}

/* Estilos adicionales para tablas */
table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
td a {
    color: #3498db;
    text-decoration: none;
}
td a:hover {
    text-decoration: underline;
}
.form-editar select,
.form-subida select,
.form-editar input,
.form-subida input[type="file"] {
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}