/* ========================================================= */
/* --- ESTILOS GLOBAIS E DO FRONTEND PÚBLICO --- */
/* ========================================================= */

body {
    font-family: Arial, sans-serif;
    background: #f8f8f8;
    margin: 0;
    padding: 0;
    color: #333;
}

/* ========================================================= */
/* --- CABEÇALHO E NAVEGAÇÃO DO FRONTEND --- */
/* ========================================================= */

header {
    background-color: #fff;
    color: #333;
    padding: 0px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.menu, .bairro-select, .tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* ========================================================= */
/* --- BOTÕES E ELEMENTOS DE FORMULÁRIO --- */
/* ========================================================= */

.btn-primary {
    background-color: #ff6600;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: #cc5200;
}

.bairro-select select {
    background-color: white;
    color: #333;
    border: 2px solid #ff6600;
    border-radius: 6px;
    padding: 10px;
    min-width: 250px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.bairro-select select:hover {
    border-color: #cc5200;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    background: #e0e0e0;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease;
}

.tab.active {
    background: #ff6600;
    color: white;
}

/* ========================================================= */
/* --- BUSCA E FILTROS --- */
/* ========================================================= */

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.search-bar {
    text-align: center;
    margin: 30px auto;
    max-width: 540px;
    flex: 1;
}

.custom-search {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.custom-search input {
    padding: 10px;
    width: 70%;
    border: 2px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.custom-search input:focus {
    outline: none;
    border-color: #ff6600;
}

.filtros-laterais {
    flex: 0 0 250px;
    background: #ffffff;
    padding: 20px;
    border-left: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ========================================================= */
/* --- LISTAGEM DE IMÓVEIS --- */
/* ========================================================= */

.result-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.result-item:hover {
    transform: translateY(-3px);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px;
}

.image-grid img {
    width: 100%;
    border-radius: 8px;
    transition: transform 0.2s ease;
    height: 180px;
    object-fit: cover;
}

.image-grid img:hover {
    transform: scale(1.05);
}

/* ========================================================= */
/* --- PAGINAÇÃO --- */
/* ========================================================= */

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination button {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination button.active {
    background-color: #ff6600;
    color: #fff;
    border-color: #ff6600;
}

.pagination button:hover:not(.active) {
    background-color: #f0f0f0;
}

/* ========================================================= */
/* --- DETALHES DO IMÓVEL --- */
/* ========================================================= */

#propertyDetailsContainer {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#propertyContent {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.property-header h1.title {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.property-header .price {
    font-size: 1.5rem;
    color: #f97316;
    font-weight: bold;
}

.property-header .address {
    font-size: 1rem;
    color: #555;
    margin-top: 0.5rem;
}

/* ========================================================= */
/* --- LIGHTBOX MODAL --- */
/* ========================================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: zoom 0.4s;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
}

/* ========================================================= */
/* --- PAINEL ADMINISTRATIVO --- */
/* ========================================================= */

.top-banner {
    background-color: #f0f0f0;
    padding: 0px 0px;
    text-align: center;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-logo {
    max-height: 60px;
    width: auto;
    display: block;
    margin: 0 auto;
}

body.admin-page {
    padding-top: 0;
    background-color: #f4f4f4;
}

.admin-header {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5em;
}

.admin-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.admin-nav a:hover {
    background-color: #555;
}

/* Botão de menu (mobile) */
.menu-toggle {
    display: none;
    font-size: 1.8em;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
}

.container-dashboard {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dashboard-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.dashboard-card h3 {
    color: #555;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.dashboard-card p {
    font-size: 2.2em;
    font-weight: bold;
    color: #007bff;
}

/* ========================================================= */
/* --- RESPONSIVIDADE --- */
/* ========================================================= */

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-top-row {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 10px;
    }

    .admin-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #444;
        padding: 10px 0;
    }

    .admin-nav.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .admin-nav a {
        width: 100%;
        text-align: left;
        padding: 12px 20px;
        border-bottom: 1px solid #555;
    }

    .admin-nav a:last-child {
        border-bottom: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================================= */
/* --- Meu Perfil --- */
/* ========================================================= */


    .form-group {
            margin-bottom: 15px;
        }
        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #555;
        }
        .form-group input[type="text"],
        .form-group input[type="email"],
        .form-group input[type="password"] {
            width: calc(100% - 22px);
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 16px;
        }
        .button-group {
            display: flex;
            justify-content: flex-end; /* Alinha botões à direita */
            gap: 10px;
            margin-top: 20px;
        }
        .button-group button {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            text-align: center;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: background-color 0.3s ease;
        }
        .button-group .submit-button {
            background-color: #007bff;
            color: white;
        }
        .button-group .submit-button:hover {
            background-color: #0056b3;
        }
        .profile-info p {
            margin-bottom: 10px;
            font-size: 1.1em;
        }
        .profile-info strong {
            color: #333;
        }
        .message-success, .message-error { /* Reutiliza o estilo */
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 15px;
        }
        .message-success {
            background-color: #d4edda;
            color: #155724;
            border-color: #c3e6cb;
        }
        .message-error {
            background-color: #f8d7da;
            color: #721c24;
            border-color: #f5c6cb;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            color: #333;
        }
