/* Configurações de Cores e Fontes */
:root {
    --gold: #d4af37;
    --dark: #1a1a1a;
    --bg-light: #f5f5f7;
    --white: #ffffff;
    --border: #e0e0e0;
    --danger: #e74c3c;
}

body.admin-body {
    background-color: var(--bg-light);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    color: var(--dark);
}

/* Utilitários */
.hidden { display: none !important; }

/* --- LOGIN (Auth Card) --- */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--dark) 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    text-align: center;
    width: 100%;
    max-width: 350px;
}

.auth-logo { width: 200px; margin-bottom: 2px; }

.auth-card h2 { margin-bottom: 25px; font-family: 'Montserrat', sans-serif; }

.auth-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-sizing: border-box;
}

/* --- PAINEL PRINCIPAL (Layout) --- */
.admin-nav {
    background: var(--dark);
    color: var(--white);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.panel-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    padding: 30px 5%;
}

@media (max-width: 900px) {
    .panel-grid { grid-template-columns: 1fr; }
}

/* --- CARDS E FORMULÁRIOS --- */
.panel-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.card-header {
    background: #f8f8f8;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 { margin: 0; font-size: 1.1rem; color: var(--gold); }

.form-box { padding: 25px; border-bottom: 1px solid #f0f0f0; }

.form-box h4 { margin-top: 0; margin-bottom: 15px; font-size: 0.9rem; color: #666; text-transform: uppercase; }

input, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    box-sizing: border-box;
}

/* --- BOTÕES --- */
.btn-gold {
    background: var(--gold);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 8px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-gold:hover { background: #b8962e; transform: translateY(-2px); }

.btn-dark {
    background: var(--dark);
    color: var(--white);
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
}

.btn-logout {
    background: transparent;
    border: 1px solid #555;
    color: #ccc;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-logout:hover { border-color: var(--gold); color: var(--gold); }

/* --- LISTAGEM DE IMÓVEIS --- */
.filter-bar { padding: 20px; }

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px;
}

.property-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    position: relative;
    border: 1px solid #eee;
}

.property-card:hover { transform: translateY(-5px); }

.property-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
}

.price-tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: var(--dark);
    color: var(--gold);
    padding: 6px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.photo-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
}



.property-info { padding: 20px; }
.property-info h5 { margin: 0 0 8px 0; font-size: 1.2rem; color: var(--dark); }
.property-info p { margin: 0; color: #777; font-size: 0.9rem; }

/* --- LIGHTBOX (Slide) --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#lightbox-img {
    max-width: 90%;
    max-height: 80%;
    border: 2px solid var(--gold);
    object-fit: contain;
}

.nav-slide {
    position: absolute;
    color: var(--white);
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
}

.prev { left: 30px; }
.next { right: 30px; }

.close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--white);
    font-size: 50px;
    cursor: pointer;
}

#caption { color: var(--white); margin-top: 15px; letter-spacing: 1px; }

/* Badges */
.badge { padding: 5px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: bold; }
.admin-gold { background: var(--gold); color: var(--white); }
.common-silver { background: #666; color: var(--white); }
/* Remova as repetições anteriores e use apenas este: */
/* Container pai para permitir posicionamento absoluto do botão */
.btn-delete {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 999 !important; /* Aumente para 999 */
    cursor: pointer !important;
    pointer-events: auto !important; /* Força o recebimento do clique */
    display: block !important;
}

.image-wrapper {
    position: relative !important;
    pointer-events: none; /* Faz o wrapper ser ignorado */
}

.property-image, .btn-delete {
    pointer-events: auto; /* Mas permite clique na imagem e no botão individualmente */
}