/* =========================================
   1. RESET E VARIÁVEIS GERAIS
   ========================================= */
:root {
    --primary-blue: #003580;       /* Azul Institucional */
    --accent-orange: #f36f21;      /* Laranja Call-to-action */
    --accent-hover: #d35400;       /* Laranja Hover */
    --active-purple: #6200ee;      /* Roxo (Destaques) */
    --bg-gray: #f4f6f8;            /* Fundo Geral */
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--bg-gray);
    color: var(--text-dark);
    padding-bottom: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* =========================================
   2. HEADER, NAVEGAÇÃO E FOOTER
   ========================================= */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 8px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Logic */
.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    line-height: 1;
    color: var(--accent-hover);
}

.logo h1 span {
    color: var(--primary-blue);
    font-weight: 900;
    margin-left: 6px;
}

/* Navegação Usuário */
.user-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.link-login {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 500;
}

.btn-anunciar {
    background-color: var(--accent-orange);
    color: var(--white);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-anunciar:hover { background-color: var(--accent-hover); }

/* Menu Dropdown */
.user-menu-container { position: relative; display: inline-block; }
.user-btn { background: transparent; border: none; font-size: 1rem; color: var(--text-dark); cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 500; padding: 10px; }
.user-btn i { font-size: 0.8rem; transition: transform 0.3s; }
.user-menu-container.active .user-btn i { transform: rotate(180deg); }
.dropdown-content { display: none; position: absolute; right: 0; background-color: var(--white); min-width: 180px; box-shadow: 0 8px 16px rgba(0,0,0,0.15); border-radius: var(--border-radius); z-index: 1001; overflow: hidden; margin-top: 5px; border: 1px solid #eee; }
.user-menu-container.active .dropdown-content { display: block; }
.dropdown-content a { color: var(--text-dark); padding: 12px 16px; text-decoration: none; display: block; font-size: 0.95rem; transition: background 0.2s; }
.dropdown-content a:hover { background-color: #f1f1f1; color: var(--primary-blue); }

/* Footer */
.main-footer {
    background-color: #f8f9fa;
    padding: 10px 0;
    border-top: 1px solid #eee;
    text-align: center;
    margin-top: auto;
}
.main-footer p { margin: 0; color: #666; font-size: 0.9rem; font-weight: bold; }

/* =========================================
   3. HERO HOME & SEARCH BOX
   ========================================= */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #00509e 100%);
    color: white;
    padding: 80px 0 60px 0;
    text-align: center;
    border-radius: 0;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.simple-search-box {
    background: white;
    padding: 25px 30px;
    border-radius: 12px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    flex-wrap: wrap;
    border: 1px solid rgba(255,255,255,0.1);
}

.home-search-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.home-search-group label {
    color: #444;
    font-weight: 700;
    font-size: 0.9rem;
    height: 24px; 
    line-height: 24px;
    margin-bottom: 8px;
    margin-left: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.home-search-group label i { color: var(--accent-orange); }

.home-search-group select,
.home-search-group input {
    width: 100%;
    height: 50px !important;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f8f9fa;
    outline: none;
    transition: all 0.3s ease;
    color: #333;
}

.home-search-group select:focus,
.home-search-group input:focus {
    border-color: var(--primary-blue);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.home-search-group:nth-child(1) { flex: 1; min-width: 200px; }
.home-search-group:nth-child(2) { flex: 2; min-width: 300px; }

.home-search-btn-wrapper {
    flex: 0 0 160px;
    margin-top: 32px !important; /* Compensa label */
    height: 50px;
}

.btn-home-action {
    background: var(--accent-orange);
    color: white;
    border: none;
    height: 50px !important;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(243, 111, 33, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-home-action:hover {
    background: #e05e10;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(243, 111, 33, 0.4);
}
.btn-home-action:active { transform: translateY(2px); box-shadow: none; }

.home-view-all-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 50px;
}

/* =========================================
   4. AUTOCOMPLETE & TAGS
   ========================================= */
.autocomplete-container { position: relative; width: 100%; }
.autocomplete-input {
    width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; color: #333; background-color: #fff; outline: none; transition: border-color 0.3s, box-shadow 0.3s; font-family: 'Roboto', sans-serif;
}
.autocomplete-input:focus { border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1); }

.autocomplete-items {
    position: absolute; border: 1px solid #d4d4d4; border-top: none; z-index: 999; top: 100%; left: 0; right: 0; border-radius: 0 0 8px 8px; background-color: #fff; max-height: 250px; overflow-y: auto; box-shadow: 0 4px 10px rgba(0,0,0,0.1); display: none;
}
.autocomplete-item { padding: 12px 15px; cursor: pointer; background-color: #fff; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; color: #444; text-align: left; }
.autocomplete-item:hover { background-color: #e9e9e9; color: var(--primary-blue); }
.autocomplete-item strong { color: var(--primary-blue); font-weight: bold; }
.autocomplete-any { font-style: italic; color: var(--accent-orange); font-weight: bold; background: #fff8f0; }

.selected-tags-container { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; width: 100%; }
.tag-item { background-color: #eef6fc; color: var(--primary-blue); padding: 4px 10px; border-radius: 6px; font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; gap: 8px; border: 1px solid #d0e4f5; animation: fadeIn 0.2s ease-in; }
.tag-close { cursor: pointer; font-size: 1.1rem; line-height: 0.8; color: #8898aa; transition: color 0.2s; }
.tag-close:hover { color: #d32f2f; }
.search-hint { font-size: 0.75rem; color: #888; margin-top: 6px; margin-left: 2px; font-style: italic; }

/* =========================================
   5. CARDS (HOME E BUSCA)
   ========================================= */

/* A. HOME CARD (VERTICAL) */
.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

.home-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.home-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }

.home-card-img {
    height: 220px; width: 100%; position: relative; overflow: hidden; background-color: #eee;
}
.home-card-img img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s;
}
.home-card:hover .home-card-img img { transform: scale(1.05); }

.badge-type {
    position: absolute; top: 10px; left: 10px; background-color: var(--primary-blue); color: white; padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; box-shadow: 0 2px 5px rgba(0,0,0,0.3); z-index: 2;
}

.home-card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.home-card-title { font-size: 1.1rem; font-weight: bold; margin-bottom: 5px; color: #333; line-height: 1.3; }
.home-card-features { display: flex; gap: 15px; color: #666; font-size: 0.9rem; margin-top: auto; padding-top: 15px; border-top: 1px solid #eee; }

/* B. SEARCH AD CARD (HORIZONTAL) */
.ad-card {
    display: flex;
    flex-direction: row;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: auto;
    min-height: 240px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    position: relative;
    margin-bottom: 5px; /* Margem de segurança adicional */
}

.ad-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: var(--primary-blue); }

.ad-image {
    width: 300px;
    min-width: 300px;
    height: auto;
    min-height: 240px;
    position: relative;
    background-color: #eee;
    align-self: stretch;
}

.ad-image img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}

.zap-badge {
    position: absolute; top: 10px; left: 10px; background-color: rgba(0, 0, 0, 0.6); color: white; padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; text-transform: uppercase;
}

.ad-content {
    flex-grow: 1;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.zap-header h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    margin: 4px 0 8px 0;
    line-height: 1.3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.6em; /* Alinha cards com títulos de tamanhos diferentes */
}

.zap-address { font-size: 0.9rem; color: #666; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zap-features { display: flex; gap: 15px; color: #555; font-size: 0.9rem; }
.zap-features span { display: flex; align-items: center; gap: 6px; background: #f5f5f5; padding: 4px 8px; border-radius: 4px; }

.zap-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.btn-zap-contact {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    margin-left: auto; /* Empurra para a direita */
}

/* Preços Compartilhados */
.card-price-container { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.card-old-price { text-decoration: line-through; color: #bbb; font-size: 0.85rem; font-weight: 400; }
.card-current-price { color: var(--primary-blue); font-weight: 800; font-size: 1.25rem; }
.card-iptu-info { font-size: 0.75rem; color: #777; margin-top: -3px; margin-bottom: 8px; display: block; font-weight: 500; }

/* =========================================
   6. PÁGINA DE BUSCA & SIDEBAR
   ========================================= */
.search-page-container { display: flex; gap: 20px; margin-top: 10px; align-items: flex-start; }

/* Sidebar */
.sidebar-filters {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 90px;
    height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eee;
}

.mobile-filter-btn { display: none; width: 100%; padding: 15px; background: white; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; font-weight: bold; color: var(--primary-blue); cursor: pointer; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.sidebar-inner { display: flex; flex-direction: column; height: 100%; }
.sidebar-scroll-area { flex: 1; overflow-y: auto; padding: 20px; scrollbar-width: thin; }
.filter-actions-fixed { flex-shrink: 0; padding: 15px 20px; border-top: 1px solid #eee; background: white; display: flex; justify-content: space-between; align-items: center; z-index: 10; }

.filter-label { display: block; font-size: 0.9rem; color: #333; margin-bottom: 10px; font-weight: 500; }
.sidebar-select { width: 100%; height: 40px; border: 1px solid #ddd; border-radius: 4px; padding: 0 10px; font-size: 0.95rem; margin-bottom: 20px; background: white; cursor: pointer; }

/* Sidebar Components */
.filter-pills-group { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.pill-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #ccc; background: white; color: #666; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.pill-btn:hover { border-color: var(--accent-orange); color: var(--accent-orange); }
.pill-btn.active { border-color: var(--accent-orange); background-color: var(--accent-orange); color: white; font-weight: bold; }

.price-row { display: flex; gap: 10px; margin-bottom: 20px; }
.price-input-group { flex: 1; }
.price-input-group label { font-size: 0.8rem; color: #666; margin-bottom: 5px; display: block; }
.price-input { width: 100%; height: 40px; border: 1px solid #ccc; border-radius: 4px; padding: 0 10px; font-size: 0.95rem; }

.btn-clean { background: none; border: none; color: var(--accent-orange); font-weight: bold; cursor: pointer; font-size: 0.9rem; }
.btn-apply { background-color: var(--accent-orange); color: white; border: none; border-radius: 25px; padding: 10px 25px; font-weight: bold; font-size: 0.95rem; cursor: pointer; transition: 0.2s; }
.btn-apply:hover { background-color: var(--accent-hover); }

.checkbox-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 25px; }
.checkbox-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.95rem; color: #555; }
.checkbox-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent-orange); border: 1px solid #ddd; }

.btn-more-types {
    background: none; border: none; color: var(--active-purple); font-weight: 600; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 5px 0; transition: color 0.2s; width: 100%; text-align: left; margin-bottom: 20px;
}
.btn-more-types:hover { color: var(--accent-orange); text-decoration: underline; }

/* Resultados */
.results-column { flex-grow: 1; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; flex-wrap: wrap; gap: 0px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.active-filters-tags { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; margin-bottom: 10px; }
.filter-tag { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid #ddd; color: var(--primary-blue); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; }
.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 25px !important; /* Força o espaçamento vertical entre os anúncios */
    width: 100%;
}

/* Ordenação */
.sort-wrapper { display: flex; align-items: center; gap: 10px; background: #fff; padding: 5px 15px; border-radius: 20px; border: 1px solid #ddd; }
.sort-wrapper label { font-size: 0.85rem; font-weight: 600; color: #555; white-space: nowrap; }
#sort-select { border: none; background: transparent; font-size: 0.9rem; font-weight: bold; color: var(--primary-blue); cursor: pointer; outline: none; padding-right: 5px; }

/* =========================================
   7. DETALHES DO IMÓVEL
   ========================================= */
.property-details-grid { display: grid; grid-template-columns: 60% 35%; gap: 5%; margin-bottom: 50px; width: 100%; align-items: start; }

.main-photo-frame { width: 100%; height: 450px; background-color: #f5f5f5; border-radius: var(--border-radius); overflow: hidden; margin-bottom: 15px; border: 1px solid #ddd; position: relative; }
.main-photo-frame img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.thumbnails-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.thumb-img { width: 90px; height: 70px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: 0.6; border: 2px solid transparent; transition: 0.2s; }
.thumb-img:hover, .thumb-img.active { opacity: 1; border-color: var(--primary-blue); }

.info-section { background: white; padding: 25px; border-radius: 12px; border: 1px solid #eee; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.prop-title { font-size: 1.8rem; line-height: 1.3; color: var(--text-dark); margin-bottom: 5px; }
.prop-location { color: var(--text-light); font-size: 1rem; margin-bottom: 20px; }
.prop-price { font-size: 2.2rem; color: var(--text-dark); font-weight: 800; margin-bottom: 5px; }

    /* --- Desktop: Valor em destaque e Reordenamento --- */
#md-prop-price {
    font-size: 3rem !important; /* Destaque máximo no Desktop */
    font-weight: 900;
    color: var(--primary-blue);
    margin-bottom: 2px !important;
    letter-spacing: -1px;
}

.price-card .features-grid {
    border-top: 1px solid #eee !important;
    padding-top: 15px !important;
    margin-top: 10px !important;
}

.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 25px 0; padding: 20px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.feature-item { text-align: center; display: flex; flex-direction: column; gap: 5px; font-size: 0.9rem; color: #555; }
.feature-item i { font-size: 1.4rem; color: var(--primary-blue); margin-bottom: 5px; }

.cta-box { display: flex; flex-direction: column; gap: 10px; }
.btn-whatsapp { background-color: #25D366; color: white; text-decoration: none; font-weight: bold; padding: 15px; border-radius: 8px; font-size: 1.1rem; text-align: center; display: flex; justify-content: center; gap: 10px; transition: 0.2s; }
.btn-whatsapp:hover { background-color: #20bd5a; transform: translateY(-2px); }

#btn-voltar-inteligente { border: 1px solid #ddd; color: #555; display: flex; align-items: center; gap: 8px; transition: all 0.2s ease-in-out; }
#btn-voltar-inteligente:hover, #btn-voltar-inteligente:active { border-color: var(--accent-orange); color: var(--accent-orange); background-color: #fff5f0; transform: translateX(-3px); }

/* Advertiser Box */
.advertiser-box { background: #ffffff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 20px; margin-bottom: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.advertiser-box::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--primary-blue); }
.advertiser-header { display: flex; align-items: center; gap: 15px; }
.advertiser-avatar { width: 50px; height: 50px; background-color: #f0f4f8; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary-blue); font-size: 1.5rem; }
.advertiser-info { display: flex; flex-direction: column; }
.advertiser-label { font-size: 0.75rem; text-transform: uppercase; color: #999; font-weight: 700; margin-bottom: 2px; }
.advertiser-name-link { font-size: 1.1rem; font-weight: 700; text-decoration: none; cursor: pointer; color: #333; }
.advertiser-name-link:hover { color: var(--accent-orange); text-decoration: underline; }
.advertiser-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; padding-top: 10px; border-top: 1px solid #f5f5f5; }
.advertiser-since, .advertiser-count { font-size: 0.85rem; color: #666; display: flex; align-items: center; gap: 6px; }
.advertiser-count i, .advertiser-since i { color: var(--primary-blue); font-size: 0.8rem; width: 16px; text-align: center; }

/* =========================================
   8. ADMIN & PAINEL (CONSOLIDADO)
   ========================================= */
.admin-container { padding-top: 30px; }
.dashboard-header { margin-bottom: 30px; text-align: center; }
.dashboard-header h2 { color: var(--primary-blue); font-size: 2rem; margin-bottom: 10px; }
.dashboard-header p { color: #666; font-size: 1rem; max-width: 600px; margin: 0 auto; line-height: 1.5; }
.admin-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 15px; }
.admin-section-header h2 { margin: 0; color: var(--text-dark); }
.period-selector { padding: 8px 15px; border: 1px solid #ddd; border-radius: 6px; background: #fff; font-size: 0.95rem; color: #555; outline: none; min-width: 150px; }

/* Abas Admin */
.admin-tabs { display: flex; gap: 30px; border-bottom: 2px solid #e0e0e0; margin-bottom: 30px; padding-bottom: 0; }
.admin-tab-btn { background: none; border: none; padding: 12px 5px; font-size: 1.05rem; font-weight: 500; color: #777; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
.admin-tab-btn:hover { color: var(--primary-blue); }
.admin-tab-btn.active { color: var(--primary-blue); border-bottom-color: var(--primary-blue); font-weight: 700; }

.sub-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.sub-tab-btn { padding: 8px 24px; border-radius: 30px; border: 1px solid #ddd; background: #f9f9f9; color: #666; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.sub-tab-btn:hover { background: #eee; color: #333; }
.sub-tab-btn.active { background-color: var(--primary-blue); color: white; border-color: var(--primary-blue); box-shadow: 0 4px 6px rgba(0, 53, 128, 0.2); }

/* Admin Stats */
.admin-stats-grid, .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; margin-bottom: 40px; }
.stat-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-left: 5px solid #ccc; display: flex; flex-direction: column; justify-content: center; position: relative; transition: transform 0.2s, box-shadow 0.2s; }
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.stat-card.clickable::after { content: "\f061"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; top: 20px; right: 20px; color: #ccc; opacity: 0.5; }
.stat-card h3 { font-size: 2.5rem; margin: 10px 0 5px 0; color: #333; font-weight: 700; }
.stat-card p { color: #666; font-size: 0.9rem; margin: 0; }
.border-blue { border-left-color: var(--primary-blue); }
.border-green { border-left-color: #27ae60; }
.border-orange { border-left-color: var(--accent-orange); }
.border-purple { border-left-color: #8e44ad; }

/* Admin Lists & Grids */
.ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; padding-bottom: 40px; }
.approvals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; width: 100%; margin-top: 20px; }

/* Admin Cards (General) */
.card-imovel, .dash-card {
    background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; border: 1px solid #eee;
}
.card-imovel:hover, .dash-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

/* Approval Card (Vertical) */
.approval-card { background: #ffffff; border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; height: 100%; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: transform 0.2s ease; position: relative; }
.approval-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.approval-img-box { width: 100%; height: 180px; position: relative; background-color: #f0f0f0; }
.approval-img-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.approval-badge { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, 0.75); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; z-index: 2; }
.approval-body { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.approval-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 8px 0; color: #333; line-height: 1.4; }
.approval-info { font-size: 0.9rem; color: #666; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.approval-price { font-size: 1.1rem; font-weight: 800; color: var(--primary-blue); }
.approval-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }

/* Dash Card Image/Body */
.card-img-top, .dash-img-container { height: 200px; width: 100%; position: relative; background: #f4f4f4; }
.card-img-top img, .dash-img-container img { width: 100%; height: 100%; object-fit: cover; }
.dash-badge { position: absolute; top: 15px; left: 15px; background: rgba(0, 0, 0, 0.6); color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2); }
.card-body, .dash-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-body h4, .dash-title { font-size: 1.1rem; font-weight: 700; color: #2c3e50; margin: 0 0 5px 0; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stats { color: #7f8c8d; font-size: 0.9rem; margin-bottom: 15px; display: flex; align-items: center; gap: 6px; }
.dash-price { font-weight: 700; color: var(--primary-blue); font-size: 1.1rem; }
.card-actions, .dash-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Badges Status */
.badge { padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.status-ativo { background: #27ae60; color: #fff; }
.status-pendente { background: #f39c12; color: #fff; }
.status-suspenso { background: #e74c3c; color: #fff; }
.status-inativo { background: #95a5a6; color: #fff; }
.status-rejeitado { background: #c0392b; color: #fff; }

/* Admin Buttons */
.btn-edit { flex: 1; background-color: var(--primary-blue); color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; font-size: 0.9rem; transition: background 0.2s; }
.btn-edit:hover { opacity: 0.9; }
.btn-icon { width: 36px; height: 36px; border: 1px solid #ddd; background: #fff; border-radius: 5px; color: #555; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-icon:hover { background: #f8f9fa; color: #333; }
.btn-delete { width: 36px; height: 36px; border: 1px solid #ffcccc; background: #fff5f5; border-radius: 5px; color: #e74c3c; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-delete:hover { background: #e74c3c; color: white; }

/* Tabela Admin */
.users-section-container { background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-top: 20px; }
.admin-filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.search-user-input { height: 40px; border: 1px solid #ddd; border-radius: 6px; padding: 0 15px; width: 300px; font-size: 0.9rem; }
.btn-export { background-color: #27ae60; color: white; border: none; padding: 8px 16px; border-radius: 6px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.btn-export:hover { background-color: #219150; }

.table-responsive { overflow-x: auto; border-radius: 8px; border: 1px solid #eee; background: white; min-width: 800px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.admin-table { width: 100%; border-collapse: collapse; background: white; }
.admin-table th { background-color: #f4f6f8; color: #444; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; padding: 15px; text-align: left; border-bottom: 2px solid #ddd; }
.admin-table td { padding: 15px; border-bottom: 1px solid #eee; color: #555; font-size: 0.95rem; vertical-align: middle; }
.admin-table tr:hover { background-color: #f9fcff; }
.badge-role { padding: 4px 8px; border-radius: 12px; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; }
.badge-admin { background-color: #e3f2fd; color: #0d47a1; }
.badge-user { background-color: #e8f5e9; color: #1b5e20; }
.badge-blocked { background: #c62828; color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; text-transform: uppercase; margin-left: 5px; }
.btn-action { background-color: var(--primary-blue); color: white; border: none; padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.btn-action:hover { opacity: 0.9; }

.btn-sm { padding: 5px 10px; font-size: 0.85rem; border-radius: 4px; border: none; cursor: pointer; font-weight: bold; transition: 0.2s; }
.btn-block { background-color: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.btn-block:hover { background-color: #c62828; color: white; }
.btn-unblock { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.btn-unblock:hover { background-color: #2e7d32; color: white; }

.table-footer { display: flex; justify-content: flex-end; align-items: center; padding: 15px; border-top: 1px solid #eee; background: #fff; gap: 10px; }
.table-footer button { background: white; border: 1px solid #ddd; padding: 5px 10px; border-radius: 4px; cursor: pointer; color: #555; }
.table-footer button:hover { background: #f1f1f1; }
.table-footer button:disabled { opacity: 0.5; cursor: not-allowed; }

/* =========================================
   9. LOGIN, FORMS & UPLOAD
   ========================================= */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 20px 0; }
.login-card { background: var(--white); width: 100%; max-width: 400px; padding: 30px; border-radius: var(--border-radius); box-shadow: 0 4px 15px rgba(0,0,0,0.1); margin: 0 auto; }
.tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid #eee; }
.tab-btn { flex: 1; padding: 10px; background: none; border: none; font-size: 1rem; cursor: pointer; color: var(--text-light); }
.tab-btn.active { color: var(--primary-blue); border-bottom: 2px solid var(--primary-blue); margin-bottom: -2px; }

.form-group { margin-bottom: 20px; display: flex; flex-direction: column; }
.form-group label { display: block; font-weight: bold; color: var(--text-dark); margin-bottom: 8px; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.password-wrapper { position: relative; width: 100%; }
.toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #999; }

.password-requirements { list-style: none; padding: 0; margin: 15px 0; width: 100%; }
.req-item { font-size: 0.85rem; margin-bottom: 6px; color: #777; display: flex; align-items: center; gap: 8px; transition: all 0.3s ease; }
.req-item i { width: 15px; text-align: center; }
.req-item.valid { color: #27ae60; font-weight: 500; }
.req-item.invalid { color: #e74c3c; }

.form-card { background: white; padding: 40px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); max-width: 850px; margin: 0 auto; }
.form-section-title { font-size: 1.1rem; color: var(--primary-blue); font-weight: bold; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; margin-top: 30px; }
.form-section-title:first-of-type { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-row.full { grid-template-columns: 1fr; }
.form-label { display: block; font-size: 0.9rem; font-weight: 600; color: #555; margin-bottom: 8px; }

/* Inputs Geral */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea, .modern-input {
    width: 100%; height: 50px; border-radius: 8px; border: 1px solid #ddd; padding: 0 15px; font-size: 1rem; color: #333; outline: none; background-color: #fff; transition: all 0.3s; font-family: 'Roboto', sans-serif;
}
input:focus, select:focus, textarea:focus, .modern-input:focus {
    border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}
input:disabled { background-color: #f0f0f0; cursor: not-allowed; }
textarea.modern-input, textarea { height: auto; padding: 15px; min-height: 120px; resize: vertical; }

.selection-group { display: flex; gap: 10px; flex-wrap: wrap; }
.select-pill { width: 45px; height: 45px; border-radius: 50%; border: 1px solid #ddd; background: white; color: #666; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.select-pill:hover { border-color: var(--primary-blue); color: var(--primary-blue); }
.select-pill.selected { background-color: var(--primary-blue); color: white; border-color: var(--primary-blue); transform: scale(1.05); box-shadow: 0 4px 10px rgba(0, 53, 128, 0.3); }

/* Upload & Preview */
.upload-zone { border: 2px dashed #ddd; border-radius: 12px; padding: 30px; text-align: center; cursor: pointer; transition: 0.3s; background-color: #fafafa; }
.upload-zone:hover { border-color: var(--accent-orange); background-color: #fffaf5; }
.upload-icon { font-size: 2rem; color: #ccc; margin-bottom: 10px; display: block; }
.upload-text { font-weight: bold; color: #666; }
.upload-sub { font-size: 0.8rem; color: #999; }

#preview-container, .preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; margin-top: 20px; }
.preview-item { position: relative; height: 120px; border-radius: 8px; overflow: hidden; border: 1px solid #ddd; background: white; cursor: grab; transition: transform 0.2s, box-shadow 0.2s; }
.preview-item:active { cursor: grabbing; }
.preview-item.dragging { opacity: 0.5; border: 2px dashed var(--primary-blue); }
.preview-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.preview-item:first-child { border: 2px solid var(--primary-blue); }
.preview-item:first-child::after { content: "CAPA"; position: absolute; bottom: 0; left: 0; width: 100%; background: var(--primary-blue); color: white; font-size: 0.7rem; font-weight: bold; text-align: center; padding: 2px 0; pointer-events: none; }
.btn-remove-photo { position: absolute; top: 5px; right: 5px; background: rgba(255, 255, 255, 0.9); color: #e74c3c; border: none; width: 24px; height: 24px; border-radius: 50%; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 10; }
.btn-remove-photo:hover { background: #e74c3c; color: white; }

/* Utilitários e Botões */
.btn-outline { background: transparent; border: 1px solid var(--primary-blue); color: var(--primary-blue); padding: 5px 15px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-full { width: 100%; padding: 15px; background-color: var(--accent-orange); color: white; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: background-color 0.3s; margin-top: 10px; }
.btn-full:hover { background-color: #e05e10; }
.btn-full:disabled { background-color: #ccc; cursor: wait; }
.btn-small {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.btn-small:hover {
    background-color: var(--primary-blue);
    color: white; 
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-small.bg-blue { background: #3498db; color: white; box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2); }
.btn-small.bg-red { background: #e74c3c; color: white; box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2); }

/* =========================================
   10. MODALS & OVERLAYS
   ========================================= */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.75) !important; /* Escurece o fundo atrás do modal */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999 !important; /* Garante que fique no topo */
    backdrop-filter: blur(3px); /* Leve desfoque no fundo para foco */
}

.modal-content {
    background-color: #ffffff !important; /* Fundo branco sólido */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    position: relative;
    z-index: 10000 !important;
    opacity: 1 !important; /* Força opacidade total */
    border: 1px solid #ddd;
}
.modal-box { background-color: #fff; padding: 25px; border-radius: 8px; width: 100%; max-width: 700px; max-height: 90vh; overflow-y: auto; position: relative; }
.close-modal { position: absolute; top: 10px; right: 15px; font-size: 28px; font-weight: bold; color: #aaa; cursor: pointer; }

/* Confirm Modal */
.confirm-modal-content { background: white; padding: 0; border-radius: 12px; width: 90%; max-width: 600px; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
.confirm-header { background: #f8f9fa; padding: 20px; border-bottom: 1px solid #eee; }
.confirm-header h3 { margin: 0; color: var(--primary-blue); }
.confirm-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.summary-group { margin-bottom: 15px; border-bottom: 1px solid #f5f5f5; padding-bottom: 10px; }
.summary-label { font-size: 0.85rem; color: #888; text-transform: uppercase; font-weight: bold; }
.summary-value { font-size: 1.1rem; color: #333; font-weight: 500; }
.confirm-footer { padding: 20px; border-top: 1px solid #eee; display: flex; gap: 15px; background: #fff; justify-content: space-between; }
.confirm-footer button { flex: 1; height: 50px; padding: 0 15px; font-size: 1rem; font-weight: bold; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s; margin: 0; width: auto !important; max-width: none; }
.confirm-footer .btn-outline { background: transparent; border: 2px solid var(--primary-blue); color: var(--primary-blue); }
.confirm-footer .btn-outline:hover { background: #f0f8ff; }
.confirm-footer #btn-confirm-final { background-color: #27ae60; color: white; border: none; box-shadow: 0 4px 6px rgba(39, 174, 96, 0.2); }
.confirm-footer #btn-confirm-final:hover { background-color: #219150; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3); }

/* Skeleton Loading */
.skeleton-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: white; z-index: 3000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.skeleton-box { width: 90%; max-width: 600px; }
.skeleton-text { height: 20px; background: #e0e0e0; margin-bottom: 15px; border-radius: 4px; animation: pulse 1.5s infinite ease-in-out; }
.skeleton-title { height: 40px; width: 60%; margin-bottom: 30px; }
.skeleton-img { height: 200px; margin-bottom: 20px; border-radius: 8px; }
.loading-spinner-large { border: 5px solid #f3f3f3; border-top: 5px solid var(--accent-orange); border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin-bottom: 20px; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Type Modal */
.type-modal-box { max-width: 500px; display: flex; flex-direction: column; padding: 0; border-radius: 16px; overflow: hidden; background: white; width: 100%; max-height: 80vh; }
.type-modal-header { padding: 20px 25px; font-size: 1.2rem; font-weight: bold; color: var(--text-dark); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.type-modal-body { padding: 25px; overflow-y: auto; }
.type-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.type-modal-footer { padding: 15px 25px; border-top: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.checkbox-large { display: flex; align-items: center; gap: 12px; font-size: 1rem; color: #333; cursor: pointer; }
.checkbox-large input { width: 20px; height: 20px; accent-color: var(--accent-orange); border: 1px solid #ccc; border-radius: 4px; }
.btn-modal-clean { background: none; border: none; color: var(--accent-orange); font-weight: bold; cursor: pointer; font-size: 1rem; }
.btn-modal-confirm { background-color: var(--active-purple); color: white; border: none; padding: 10px 30px; border-radius: 25px; font-weight: bold; font-size: 1rem; cursor: pointer; transition: 0.2s; }

/* Property Modal */
.property-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); z-index: 2000; overflow-y: auto; padding: 20px; align-items: flex-start; justify-content: center; }
.property-modal-content { background: #fff; width: 100%; max-width: 1100px; margin: 40px auto; border-radius: 12px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.5); overflow: hidden; animation: slideUp 0.3s ease-out; }
.btn-close-modal { position: absolute; top: 15px; right: 15px; background: #f1f1f1; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; color: #333; cursor: pointer; z-index: 10; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.btn-close-modal:hover { background: #dc3545; color: #fff; }
.modal-body-scroll { padding: 30px; }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* Profile Modal Stats */
.profile-header-info { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.profile-header-info h3 { color: var(--primary-blue); margin-bottom: 5px; }
.profile-member-since { color: #777; font-size: 0.9rem; }
.profile-stats-row { display: flex; justify-content: space-around; background: #fff; padding: 15px; border-radius: 8px; border: 1px solid #eee; margin-bottom: 20px; }
.p-stat-box { text-align: center; font-size: 0.85rem; color: #777; }
.p-stat-box span { display: block; font-size: 1.4rem; font-weight: 800; color: var(--primary-blue); margin-bottom: 4px; }

/* User Ads List (Modal) */
#user-ads-list { display: flex; flex-direction: column; gap: 12px; padding: 10px; background: #f8f9fa; border-radius: 8px; max-height: 60vh; overflow-y: auto; }
.profile-ads-scroll { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; max-height: 450px; overflow-y: auto; padding: 10px; }
.profile-ads-scroll::-webkit-scrollbar { width: 6px; }
.profile-ads-scroll::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 3px; }

/* Mini Card (Horizontal para listas) */
.mini-ad-card { display: flex; align-items: center; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 10px; gap: 15px; width: 100%; min-height: 80px; transition: transform 0.2s, box-shadow 0.2s; }
.mini-ad-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); border-color: var(--primary-blue); }
.mini-ad-img { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background-color: #eee; }
.mini-ad-content { flex: 1; display: flex; justify-content: space-between; align-items: center; min-width: 0; }
.mini-ad-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.mini-ad-info h4 { margin: 0; font-size: 1rem; color: #333; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.mini-ad-price { font-size: 0.9rem; font-weight: bold; color: #555; }
.status-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; font-weight: 800; text-transform: uppercase; width: fit-content; margin-bottom: 2px; }
.status-badge.ativo { background: #e8f5e9; color: #2e7d32; }
.status-badge.pendente { background: #fff3e0; color: #ef6c00; }
.status-badge.suspenso { background: #ffebee; color: #c62828; }
.status-badge.alugado { background: #e3f2fd; color: #1565c0; }
.btn-mini-action { width: 35px; height: 35px; border-radius: 50%; border: 1px solid #ddd; background: #fff; color: #555; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.btn-mini-action:hover { background: var(--primary-blue); color: white; border-color: var(--primary-blue); }

/* Modal Admin Specifics */
.modal-admin-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.modal-admin-title h3 { margin: 0; color: #2c3e50; font-size: 1.5rem; }
.modal-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #f8f9fa; padding: 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #eee; }
.info-item label { display: block; font-size: 0.75rem; text-transform: uppercase; color: #95a5a6; font-weight: 700; margin-bottom: 4px; }
.info-item span { font-size: 1rem; color: #34495e; font-weight: 500; }
.desc-box { background: #fff; border: 1px solid #e0e0e0; padding: 15px; border-radius: 8px; line-height: 1.6; color: #555; max-height: 150px; overflow-y: auto; font-size: 0.95rem; }
.action-area-header { font-size: 1rem; font-weight: 700; color: #2c3e50; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }


/* =========================================
   11. RESPONSIVIDADE
   ========================================= */
@media (max-width: 1200px) {
    .dashboard-grid, .admin-stats-grid, .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) { 
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); } 
    .admin-stats-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .home-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =================================================================
   CORREÇÕES RESPONSIVAS (MOBILE)
   ================================================================= */

/* =================================================================
   CORREÇÕES RESPONSIVAS (MOBILE) - DEFINITIVO
   ================================================================= */

/* =================================================================
   CORREÇÃO DEFINITIVA MOBILE (MODAL E GERAL)
   ================================================================= */
@media (max-width: 768px) {

    /* --- 1. MODAL EM TELA CHEIA --- */
    .property-modal-content {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .modal-body-scroll {
        padding: 0 !important; /* Remove padding para foto encostar nas bordas */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* --- 2. LAYOUT VERTICAL (SEM COLUNAS) --- */
    .property-detail-grid {
        display: flex !important;
        flex-direction: column !important; /* Empilha um embaixo do outro */
        gap: 0 !important;
    }

    .left-col, .right-col {
        width: 100% !important;
        padding: 0 !important;
    }

    /* --- 3. FOTO PRINCIPAL --- */
    .gallery-container {
        width: 100%;
        margin-bottom: 0;
    }

    .main-photo-frame {
        width: 100% !important;
        height: 280px !important; /* Altura fixa boa para celular */
        border: none !important;
        border-radius: 0 !important;
        background: #000;
        margin: 0 !important;
    }

    .main-photo-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover !important; /* Garante que preencha sem distorcer */
    }

    /* Thumbnails abaixo da foto principal */
    .thumbnails-scroll {
        padding: 10px;
        background: #fff;
        border-bottom: 1px solid #eee;
        display: flex;
        gap: 10px;
        overflow-x: auto;
    }

    /* --- 4. CONTEÚDO DE TEXTO --- */
    .detail-section {
        padding: 20px;
        background: #fff;
    }

    .detail-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-top: 0;
    }

    /* --- 5. BLOCO DE PREÇO E ANUNCIANTE --- */
    .price-card {
        background: #f9f9f9 !important; /* Destaca o fundo levemente */
        padding: 12px !important; 
        border-top: 1px solid #eee;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

        .price-card .features-grid { 
        margin-top: 8px !important; 
        gap: 2px !important; 
    }

    /* Botão WhatsApp Grande */
    .btn-whatsapp-full {
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 8px;
    }

        .btn-whatsapp-full, #md-btn-share {
        width: auto !important;
        min-width: 180px !important;
        padding: 8px 15px !important;
        font-size: 0.85rem !important;
    }

    .cta-box {
        align-items: center !important;
        gap: 8px !important;
    }

    /* Novo container para características no desktop (abaixo do preço/taxas) */
    .features-reordered {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid #eee;
        text-align: center;
    }

    /* --- 6. AJUSTES GERAIS DE HEADER --- */
    .header-content {
        padding: 10px 15px;
    }
    .user-btn span, .user-btn .fa-chevron-down {
        display: none; /* Esconde texto 'Minha Conta' no mobile */
    }
    .logo img {
        height: 35px; /* Logo menor */
    }
    .logo h1 {
        font-size: 1.1rem;
    }
    
    /* Fecha modal fixo no topo */
    .btn-close-modal {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 2500 !important;
    }

    .ad-card {
        flex-direction: column !important;
        width: 100% !important;
        margin: 0 0 15px 0 !important;
        height: auto !important;
        min-height: unset !important;
        border-radius: 8px !important;
    }

    .ad-image {
        width: 100% !important;
        min-width: 100% !important;
        height: 140px !important; /* Altura reduzida para o card */
    }

    .ad-image img {
        object-fit: cover !important; /* Crop da imagem */
        width: 100% !important;
        height: 100% !important;
    }

    .ad-content {
        padding: 12px 15px !important;
    }
    
    .search-page-container {
        flex-direction: column !important;
        padding: 0 !important;
    }

    .zap-header h4 {
        height: auto !important;
        margin-bottom: 5px !important;
    }

    .zap-footer {
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .sidebar-filters {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        height: auto !important;
        border-radius: 0 !important;
        border-x: none !important;
        margin-bottom: 10px;
    }

    .mobile-filter-btn {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background: #fff;
        border-bottom: 1px solid #eee;
        width: 100%;
        cursor: pointer;
        color: var(--primary-blue);
        font-weight: bold;
    }

    .sidebar-inner {
        display: none; /* Escondido por padrão */
        flex-direction: column;
        background: #fff;
    }

    .sidebar-inner.active {
        display: flex; /* Mostra ao clicar */
    }

    .results-column {
        width: 100% !important;
        padding: 10px !important;
    }

    .selected-tags-container {
        padding: 5px 0;
        gap: 8px !important;
    }

    .tag-item {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
    }

    /* Garante que o modal mobile ocupe a tela toda e permita scroll */
    .property-modal-overlay {
        padding: 0 !important;
        align-items: flex-start !important;
    }

    .property-modal-content {
        height: 100% !important;
        min-height: 100vh !important;
        border-radius: 0 !important;
    }

    .cards-grid {
        gap: 15px !important; /* Espaçamento menor no mobile */
    }

     /* Título limitado a 1 linha */
    #md-prop-title {
        font-size: 1.2rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #md-prop-price {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
        margin: 0 !important; 
    }

    .features-grid {
        margin: 10px 0 !important;
        padding: 10px 0 !important;
        gap: 5px !important;
    }
    .feature-item i {
        font-size: 1rem !important; /* Ícones menores */
    }
    .feature-item small {
        font-size: 0.7rem !important;
    }

    /* Descrição Sanfona (Truncada em 2 linhas) */
    .description-container {
        position: relative;
    }
    #md-prop-desc {
        font-size: 0.9rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    #md-prop-desc.expanded {
        display: block;
        -webkit-line-clamp: unset;
    }
    .btn-read-more {
        background: none;
        border: none;
        color: var(--primary-blue);
        font-weight: bold;
        font-size: 0.85rem;
        padding: 5px 0;
        cursor: pointer;
        display: none; /* Mostrado via JS se necessário */
        margin-bottom: 10px;
    }

    .feature-item {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .feature-item i { 
        font-size: 0.9rem !important; /* Ícones bem menores */
        margin-bottom: 0 !important;
    }
    .feature-item span {
        font-size: 0.85rem !important;
        font-weight: bold;
    }
    .feature-item small { 
        font-size: 0.6rem !important; /* Legendas minúsculas */
        text-transform: uppercase;
        color: #888;
    }

    .advertiser-meta {
        border-top: 1px dashed #ddd;
        margin-top: 8px;
        padding-top: 8px;
    }

    .advertiser-count i {
        margin-right: 5px;
        color: var(--primary-blue);
    }

    /* Responsividade Suporte */
    .ticket-item {
        grid-template-columns: 1fr 1fr;
        font-size: 0.85rem;
    }
    .ticket-item div:nth-child(1) { grid-column: span 2; font-weight: bold; }
}

@media (max-width: 600px) {
    .profile-stats-row { grid-template-columns: repeat(2, 1fr); }
    .mini-ad-card { height: auto; flex-direction: column; }
    .mini-ad-img { width: 100%; height: 140px; }
    .home-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-section { padding: 40px 0 30px 0; }
    .confirm-footer { flex-direction: column-reverse; }
    .confirm-footer button { width: 100% !important; flex: auto; }
}

@media (max-width: 576px) { 
    .dashboard-grid { grid-template-columns: 1fr; } 
    .admin-stats-grid, .stats-grid { grid-template-columns: 1fr; }
    .admin-tabs { gap: 15px; overflow-x: auto; }
}

@media (max-width: 480px) {
    .logo img { height: 40px; }
    .logo h1 { font-size: 1.2rem; }
}

/* =================================================================
   CORREÇÃO: FUNDO DO MODAL DE ADMINISTRAÇÃO
   ================================================================= */

/* Garante que o fundo do modal seja branco sólido e não transparente */
#modal-admin .modal-content {
    background-color: #ffffff !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4); /* Sombra forte para destacar */
    border-radius: 12px;
    position: relative;
    z-index: 2000; /* Garante que fique acima de tudo */
    overflow: hidden; /* Mantém bordas arredondadas */
}

#modal-user-ads {
    z-index: 1000 !important;
}

/* Escurece mais o fundo atrás do modal para focar a atenção */
#modal-admin.modal-overlay {
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px); /* Desfoque no fundo para estética */
    z-index: 10000;
}

/* Ajuste nos inputs dentro do modal para não ficarem transparentes */
#modal-admin textarea, 
#modal-admin input {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
}

/* --- SISTEMA DE SUPORTE --- */
.ticket-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}
.status-aberto { background: #e3f2fd; color: #0d47a1; }
.status-em-tratamento { background: #fff3e0; color: #e65100; }
.status-respondido { background: #e8f5e9; color: #1b5e20; }
.status-finalizado { background: #eeeeee; color: #616161; }

.ticket-item {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    align-items: center;
    gap: 10px;
}

.support-deadline-alert {
    background: #fff8e1;
    border-left: 4px solid #ffb300;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #856404;
}

#char-count {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
    display: block;
    margin-top: 5px;
}

.tickets-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.admin-ticket-card {
    transition: transform 0.2s;
    border: 1px solid #ddd !important;
}

.admin-ticket-card:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-manage {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.admin-table td:last-child div {
    display: flex;
    justify-content: center; /* Centraliza os ícones na coluna */
    gap: 10px; /* Espaçamento idêntico à versão anterior */
}

.stats-header-modal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-box-modal {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #eee;
}

.stat-box-modal span {
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary-blue);
}

.ad-horizontal-card {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ad-horizontal-img {
    width: 100px;
    height: 80px;
    object-fit: cover;
}

.ad-horizontal-info {
    flex: 1;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge-mini {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 4px;
    display: inline-block;
}