/* css/admin.css - Estilos do Painel Administrativo (VERSÃO COMPLETA) */
/* Inclui estilos extraídos do index.html e pdf-unified.js para centralização */
/* ATUALIZADO: Layout original restaurado para aba INCLUIR/EDITAR em mobile */
/* CORREÇÃO: Estabilidade durante edição de imóveis - previne desajustes */
/* - Campos Título e Preço na mesma linha (mesmo durante edição) */
/* - Espaçamento justo (estilo C/C++ skeuomorphism) preservado */
/* - Aba GERENCIAR mantém 100% largura */

/* ========== VARIÁVEIS GLOBAIS ========== */
:root {
    --primary: #1a5276;
    --secondary: #2980b9;
    --accent: #3498db;
    --gold: #f39c12;
    --green: #27ae60;
    --text: #2c3e50;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #27ae60;
}

/* ========== ESTILOS DO PAINEL ADMIN ========== */
.admin-panel {
    background: #f8f9fa;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1000px;
    border-radius: 10px;
    display: none;
}

.admin-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 1.2rem;
}

/* ========== BOTÃO ADMIN TOGGLE ========== */
.admin-toggle {
    position: fixed;
    bottom: 15px !important;
    right: 15px !important;
    background: #1a5276;
    color: white;
    border: 1px solid #0e3d5c;
    border-top-color: #2980b9;
    border-left-color: #2980b9;
    width: 48px !important;
    height: 48px !important;
    border-radius: 0px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9 !important;
    transition: all 0.3s ease;
}

.admin-toggle:hover {
    background: #0e3d5c;
    opacity: 1 !important;
}

.admin-toggle:active {
    border-top-color: #0e3d5c;
    border-left-color: #0e3d5c;
    border-bottom-color: #2980b9;
    border-right-color: #2980b9;
    transform: translateY(1px);
}

/* ========== BOTÃO VOLTAR AO TOPO ========== */
#backToTopBtn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(26, 82, 118, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    opacity: 0.85;
}

#backToTopBtn:hover {
    background: rgba(26, 82, 118, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: scale(1.08);
    opacity: 1;
    box-shadow: 0 6px 25px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}

#backToTopBtn:active {
    transform: scale(0.95);
}

/* PDF ICON */
.pdf-access {
    position: absolute;
    bottom: 2px;
    right: 35px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--primary);
    transition: all 0.3s ease;
    z-index: 15;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 1px solid rgba(0,0,0,0.15);
}

.pdf-access:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(0,0,0,0.4);
    color: #1a5276;
}

/* VIDEO INDICATOR */
.video-indicator {
    position: absolute !important;
    top: 40px !important;
    right: 10px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    z-index: 9 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(4px) !important;
}

.video-indicator i {
    color: white !important;
    font-size: 12px !important;
}

/* MODAL ANIMATIONS */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.pdf-modal {
    animation: modalFadeIn 0.3s ease;
}

.pdf-modal-content {
    animation: modalSlideIn 0.3s ease;
}

#pdfSelectionModal {
    animation: modalFadeIn 0.25s ease;
}

#pdfSelectionModal > div {
    animation: modalSlideIn 0.25s ease;
}

#closeSelectionModalBtn {
    transition: all 0.2s ease;
}

#closeSelectionModalBtn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #c0392b !important;
}

/* IMAGE PREVIEW */
.image-preview-container {
    position: relative;
    display: inline-block;
    margin: 5px;
}

.delete-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.delete-image-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.image-count {
    position: absolute;
    bottom: 1px;
    right: 1px;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 0.1rem 0.35rem;
    border-radius: 8px 0 8px 8px;
    font-size: 0.75rem;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.6);
    font-weight: 600;
    min-width: 22px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 0.5px solid rgba(255,255,255,0.15);
}

/* UPLOAD SECTIONS */
#existingImagesSection .image-preview-container,
#existingPdfsSection .image-preview-container {
    border: 2px solid var(--success);
}

#existingImagesSection .delete-image-btn,
#existingPdfsSection .delete-image-btn {
    background: #e74c3c;
}

#newImagesSection .image-preview-container {
    border: 2px dashed #3498db;
}

#newImagesSection .delete-image-btn,
#newPdfsSection .delete-image-btn {
    background: #3498db;
}

#newImagesSection .delete-image-btn:hover,
#newPdfsSection .delete-image-btn:hover {
    background: #2980b9;
}

#newPdfsSection .pdf-file-item {
    border: 2px dashed #3498db;
    background: #f8faff;
}

#existingImagesSection,
#existingPdfsSection {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

#newImagesSection,
#newPdfsSection {
    margin-top: 1rem;
    padding-top: 1.5rem;
}

#existingImagesSection > div,
#newImagesSection > div,
#existingPdfsSection > div,
#newPdfsSection > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* FORM STYLES */
#propertyForm input,
#propertyForm textarea,
#propertyForm select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#propertyForm input:focus,
#propertyForm textarea:focus,
#propertyForm select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}

#propertyForm button[type="submit"] {
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

#propertyForm button[type="submit"]:hover {
    background: #219653;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 83, 0.3);
}

#cancelEditBtn {
    background: #95a5a6;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#cancelEditBtn:hover {
    background: #7f8c8d;
}

/* CANCEL BUTTON FIX */
#cancelEditBtn {
    cursor: pointer !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
}

#cancelEditBtn:hover {
    background: #7f8c8d !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3) !important;
}

#cancelEditBtn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

#cancelEditBtn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
}

#cancelEditBtn * {
    pointer-events: none !important;
}

#cancelEditBtn.cancelling {
    animation: pulseCancel 0.5s ease;
}

@keyframes pulseCancel {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); box-shadow: 0 0 0 5px rgba(149, 165, 166, 0.3); }
    100% { transform: scale(1); }
}

/* UPLOAD AREAS */
#uploadArea,
#pdfUploadArea {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

#uploadArea:hover,
#pdfUploadArea:hover {
    border-color: var(--primary);
    background: #f0f8ff;
}

/* ========== PREVIEW DE ARQUIVOS - LAYOUT HORIZONTAL ========== */
#uploadPreview,
#pdfUploadPreview {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 0.5rem 0 !important;
    padding: 0.6rem !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

#uploadPreview::-webkit-scrollbar,
#pdfUploadPreview::-webkit-scrollbar {
    height: 6px !important;
}

#uploadPreview::-webkit-scrollbar-track,
#pdfUploadPreview::-webkit-scrollbar-track {
    background: #e0e0e0 !important;
    border-radius: 3px !important;
}

#uploadPreview::-webkit-scrollbar-thumb,
#pdfUploadPreview::-webkit-scrollbar-thumb {
    background: var(--primary) !important;
    border-radius: 3px !important;
}

#uploadPreview > div,
#pdfUploadPreview > div {
    position: relative !important;
    width: 70px !important;
    height: 70px !important;
    flex: 0 0 auto !important;
    background: #fff !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    transition: transform 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#uploadPreview > div:hover,
#pdfUploadPreview > div:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

#uploadPreview img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background: #f0f0f0 !important;
}

#uploadPreview video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background: #1a1a2e !important;
}

#pdfUploadPreview .fa-file-pdf {
    font-size: 2rem !important;
    color: #e74c3c !important;
}

#pdfUploadPreview div {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fef9e6 !important;
}

#uploadPreview > div div:last-child,
#pdfUploadPreview > div div:last-child {
    font-size: 0.55rem !important;
    padding: 2px !important;
}

#uploadPreview .delete-image-btn,
#pdfUploadPreview .delete-image-btn {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    width: 18px !important;
    height: 18px !important;
    background: #e74c3c !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    transition: all 0.2s ease !important;
}

#uploadPreview .delete-image-btn:hover,
#pdfUploadPreview .delete-image-btn:hover {
    background: #c0392b !important;
    transform: scale(1.1) !important;
}

#uploadPreview .order-indicator,
#pdfUploadPreview .order-indicator {
    font-size: 0.5rem !important;
    width: 14px !important;
    height: 14px !important;
    bottom: 1px !important;
    right: 1px !important;
    top: auto !important;
}

/* ADMIN BUTTONS */
.admin-panel button:not(.delete-image-btn):not(.pdf-access):not(.gallery-modal-btn):not(.gallery-modal-close) {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.admin-panel button:not(.delete-image-btn):not(.pdf-access):not(.gallery-modal-btn):not(.gallery-modal-close):hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.admin-panel button[style*="background: #e74c3c"] {
    background: #e74c3c !important;
}

.admin-panel button[style*="background: #e74c3c"]:hover {
    background: #c0392b !important;
}

/* PASSWORD VALIDATION */
#pdfPassword[aria-invalid="true"] {
    border-color: #e74c3c !important;
    background-color: #ffeaea !important;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

#pdfPassword:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

#pdfPasswordForm {
    position: relative;
}

#pdfPasswordForm:after {
    content: "*";
    color: #e74c3c;
    position: absolute;
    top: 1rem;
    right: 0.5rem;
    font-size: 1.2rem;
}

#pdfPassword:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

#pdfPassword:valid:not(:placeholder-shown) {
    border-color: var(--success) !important;
    background-color: #e8f8ef !important;
}

/* LOCATION AUTOCOMPLETE */
#propLocation {
    position: relative !important;
    z-index: 100 !important;
}

#propertyForm,
.admin-panel {
    overflow: visible !important;
}

/* PROPERTY LIST */
#propertyList {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #e0e0e0;
    max-height: 650px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

#propertyList::-webkit-scrollbar {
    width: 6px;
}

#propertyList::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 3px;
}

#propertyList::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

#propertyList button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#propertyList button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#propertyListItems {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    #propertyList > div:first-child + div {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #propertyList button, 
    #propertyList span {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
    
    select[onchange*="adminItemsPerPage"] {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
}

select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2);
}

@media (max-width: 768px) {
    select {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
    
    .property-item {
        padding: 0.8rem;
    }
}

.pagination-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.pagination-loading::after {
    content: "\1F504";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    background: rgba(255,255,255,0.9);
    padding: 1rem;
    border-radius: 50%;
}

/* ========== ABAS ESTILO WINDOWS 98 / CLASSIC UI ========== */

/* Container das abas */
.admin-tabs {
    display: flex;
    gap: 0px;
    margin-bottom: -1px;
    position: relative;
    padding-left: 12px;
    background: #ece9d8;
    border-top: 2px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: none;
    border-radius: 0px;
    box-shadow: none;
}

/* Estilo base da aba - Desktop */
.admin-tab {
    position: relative;
    padding: 0.5rem 1.5rem 0.6rem 1.5rem;
    background: #ece9d8;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'Segoe UI', 'Tahoma', 'Microsoft Sans Serif', sans-serif;
    color: #000000;
    transition: none;
    letter-spacing: normal;
    text-shadow: none;
    transform: none;
    margin-right: -2px;
    z-index: 1;
    border-left: 1px solid #ffffff;
    border-top: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: none;
    box-shadow: none;
    min-width: 100px;
    text-align: center;
}

/* Ícones das abas - inativo escuro, ativo dourado */
.admin-tab i {
    margin-right: 10px;
    font-size: 1rem;
    color: #555555;
    filter: none;
    text-shadow: none;
    vertical-align: middle;
    transition: all 0.1s ease;
}

.admin-tab:not(.active):hover i {
    color: #1a5276;
}

.admin-tab.active i {
    color: #ffd700;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.admin-tab::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: -1px;
    border-left: 1px solid #ffffff;
    border-top: 1px solid #ffffff;
    border-right: 1px solid #808080;
    pointer-events: none;
    z-index: -1;
}

.admin-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ece9d8;
    z-index: 2;
}

.admin-tab:not(.active):hover {
    background: #f5f3e8;
    color: #000000;
    transform: none;
    box-shadow: none;
}

.admin-tab.active {
    background: #ece9d8;
    color: #000000;
    border: none;
    transform: translateY(1px);
    z-index: 4;
    position: relative;
    text-shadow: none;
    border-left: 1px solid #808080;
    border-top: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: none;
    box-shadow: inset 1px 1px 0px 0px rgba(0,0,0,0.1);
    margin-top: 1px;
    padding-top: 0.5rem;
    padding-bottom: 0.7rem;
}

.admin-tab.active::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: -2px;
    border-left: 1px solid #808080;
    border-top: 1px solid #808080;
    border-right: 1px solid #ffffff;
    pointer-events: none;
    z-index: -1;
}

.admin-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ece9d8;
    z-index: 5;
}

.admin-tab:first-child {
    margin-left: 0;
    border-left: 1px solid #ffffff;
}

.admin-tab.active:first-child {
    border-left: 1px solid #808080;
}

/* ========== CONTEÚDO DAS ABAS ========== */
.admin-tab-content {
    display: none;
    padding: 1rem;
    background: #ece9d8;
    border: 1px solid #808080;
    border-top: none;
    border-radius: 0px;
    margin-top: 0;
    position: relative;
    z-index: 2;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.8), inset 0 -1px 0 0 rgba(0,0,0,0.1);
    transition: none;
    overflow: visible !important;
    padding-bottom: 1.5rem !important;
}

.admin-tab-content::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border: 1px solid #ffffff;
    pointer-events: none;
    z-index: 0;
}

.admin-tab-content.active {
    display: block;
    border-left: 1px solid #808080;
}

.admin-tab-content > div {
    background: #ffffff;
    border: 1px solid #d4d0c8;
    padding: 0.8rem;
    position: relative;
    z-index: 1;
}

/* ========== TÍTULOS DAS SEÇÕES ========== */
.section-title-windows {
    position: relative;
    margin-top: 0;
    margin-bottom: 1rem;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(135deg, #1a5276 0%, #0e3d5c 100%);
    color: #ffffff;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid #0e3d5c;
    border-top-color: #2980b9;
    border-left-color: #2980b9;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.2), inset 1px 1px 0 rgba(255,255,255,0.2);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.section-title-windows::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid rgba(255,255,255,0.15);
    pointer-events: none;
    z-index: 1;
}

.section-title-windows::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.03) 0px,
        rgba(255,255,255,0.03) 2px,
        transparent 2px,
        transparent 6px
    );
    pointer-events: none;
    z-index: 0;
}

.section-title-windows i {
    margin-right: 10px;
    font-size: 1rem;
    color: #ffd700;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.section-title-windows small {
    font-size: 0.65rem;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    color: #ffd700;
    margin-left: 8px;
}

.section-title-windows small strong {
    color: #ffd700;
    font-weight: bold;
    font-size: 0.8rem;
}

/* ========== FORMULÁRIO - CORREÇÃO DEFINITIVA DO ESPAÇAMENTO ========== */
.form-group {
    margin-bottom: 0.6rem;
    padding: 0.3rem;
    border: 1px solid #808080;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    background: #ece9d8;
}

.form-group label {
    display: block;
    margin-bottom: 0.15rem;
    font-weight: 700;
    font-size: 0.65rem;
    color: #000000;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label i {
    margin-right: 4px;
    color: #1a5276;
}

/* CORREÇÃO DEFINITIVA: REMOVER TODO ESPAÇO EXTRA ENTRE TÍTULO E PREÇO */
.form-row-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem;
    margin-bottom: 0;
}

.form-row-2cols .form-group {
    margin-bottom: 0;
    padding: 0.25rem;
}

/* Garantir que os inputs fiquem justapostos */
.form-row-2cols .form-group:first-child {
    margin-right: 0;
}

.form-row-2cols .form-group:last-child {
    margin-left: 0;
}

/* Efeito de afundamento nas bordas dos campos brancos */
.admin-tab-content input,
.admin-tab-content textarea,
.admin-tab-content select {
    background: #ffffff;
    border: 2px solid;
    border-color: #404040 #ffffff #ffffff #404040;
    padding: 0.35rem 0.45rem;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.1s ease;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1), inset -1px -1px 2px rgba(0,0,0,0.05);
}

.admin-tab-content input:focus,
.admin-tab-content textarea:focus,
.admin-tab-content select:focus {
    border-color: #000000 #808080 #808080 #000000;
    outline: none;
    background: #fffff0;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.15), inset -1px -1px 3px rgba(0,0,0,0.08);
}

.admin-tab-content input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    transform: scale(1.1);
    vertical-align: middle;
    box-shadow: none;
}

#uploadArea, #pdfUploadArea {
    border: 2px solid;
    border-color: #404040 #ffffff #ffffff #404040;
    background: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.1s ease;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    text-align: center;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1), inset -1px -1px 2px rgba(0,0,0,0.05);
}

#uploadArea:active, #pdfUploadArea:active {
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.12);
}

#uploadPreview, #pdfUploadPreview {
    background: #ffffff;
    border: 1px solid #808080;
    padding: 0.3rem;
    min-height: 60px;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.08);
}

#propertyForm button[type="submit"] {
    background: #27ae60;
    color: white;
    border: 2px solid;
    border-color: #2ecc71 #1e8449 #1e8449 #2ecc71;
    font-weight: 700;
    padding: 0.5rem 1rem;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.1s ease;
}

#propertyForm button[type="submit"]:hover {
    background: #219653;
    transform: scale(1.01);
}

#propertyForm button[type="submit"]:active {
    border-color: #1e8449 #2ecc71 #2ecc71 #1e8449;
    transform: translateY(1px);
}

#cancelEditBtn {
    background: #ece9d8;
    color: #000000;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#cancelEditBtn:active {
    border-color: #808080 #ffffff #ffffff #808080;
    transform: translateY(1px);
}

/* ========== LISTA DE PROPRIEDADES ========== */
.manage-container {
    max-height: 650px;
    overflow-y: auto;
    padding-bottom: 2rem !important;
    margin-bottom: 0 !important;
    background: #ffffff;
    border: 1px solid #808080;
    border-top-color: #404040;
    border-left-color: #404040;
}

.manage-container::-webkit-scrollbar {
    width: 16px;
    background: #ece9d8;
}

.manage-container::-webkit-scrollbar-track {
    background: #ece9d8;
    border-left: 1px solid #808080;
    border-top: 1px solid #808080;
}

.manage-container::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 1px solid #ffffff;
    border-top-color: #808080;
    border-left-color: #808080;
}

.manage-container::-webkit-scrollbar-thumb:hover {
    background: #d4d0c8;
}

#propertyList {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    gap: 0;
    padding-bottom: 1.5rem !important;
}

.property-item {
    background: #ffffff;
    padding: 0.8rem;
    margin: 0;
    border-radius: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #1a5276;
    transition: all 0.2s ease;
    border-bottom: 1px solid #d4d0c8;
}

.property-item:hover {
    background: #f5f3e8;
}

.property-item:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
    padding-bottom: 0.6rem !important;
}

@keyframes highlightPulse {
    0% { box-shadow: 0 0 0 0 rgba(26, 82, 118, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(26, 82, 118, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 82, 118, 0); }
}
.admin-panel-highlight { animation: highlightPulse 0.8s ease; }
.admin-panel { display: none; }

/* ========== DESKTOP - PAGINAÇÃO ========== */
#propertyList > div:last-child {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.3rem !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    padding: 0.6rem 0.5rem !important;
    background: #ece9d8 !important;
    border-top: 1px solid #808080 !important;
}

#propertyList > div:last-child button,
#propertyList > div:last-child span {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 0.5rem !important;
    margin: 0 !important;
    font-size: 0.8rem !important;
    font-weight: normal !important;
    border-radius: 0px !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    background: #ece9d8 !important;
    color: #000000 !important;
    border: 1px solid #808080 !important;
    border-top-color: #ffffff !important;
    border-left-color: #ffffff !important;
    transition: none !important;
    font-family: 'Courier New', monospace !important;
}

#propertyList > div:last-child button.active-page,
#propertyList > div:last-child button[style*="background: #f39c12"],
#propertyList > div:last-child button[style*="background: var(--gold)"] {
    background: #1a5276 !important;
    color: #ffffff !important;
    border: 1px solid #0e3d5c !important;
}

#propertyList > div:last-child select {
    flex: 0 0 auto !important;
    margin-left: 0.5rem !important;
    padding: 0.2rem 0.3rem !important;
    font-size: 0.7rem !important;
    border-radius: 0px !important;
    height: 32px !important;
    width: 95px !important;
    background: #ffffff !important;
    border: 1px solid #808080 !important;
    border-top-color: #404040 !important;
    border-left-color: #404040 !important;
    font-family: 'Courier New', monospace !important;
    cursor: pointer !important;
}

#propertyList > div:last-child button:not(:disabled):hover,
#propertyList > div:last-child span:not(.ellipsis):hover {
    background: #d4d0c8 !important;
}

#propertyList > div:last-child button:active {
    border-top-color: #808080 !important;
    border-left-color: #808080 !important;
    border-bottom-color: #ffffff !important;
    border-right-color: #ffffff !important;
    transform: translateY(1px);
}

#propertyList > div:last-child span.ellipsis {
    background: transparent !important;
    border: none !important;
    cursor: default !important;
    min-width: 20px !important;
    color: #000000 !important;
    font-weight: bold !important;
}

#propertyList > div:last-child span.ellipsis:hover {
    background: transparent !important;
    border: none !important;
}

/* ========== MOBILE - AJUSTE FINO ========== */
@media (max-width: 768px) {
    .admin-tabs {
        padding-left: 8px;
        gap: 0px;
        flex-wrap: nowrap;
        background: #ece9d8;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
    
    .admin-tab {
        padding: 0.35rem 0.7rem 0.45rem 0.7rem;
        font-size: 0.6rem;
        min-width: auto;
        width: auto;
        flex: 0 0 auto;
        text-align: center;
        white-space: nowrap;
        margin-right: -18px;
        z-index: 1;
        background: #d8d4c2;
        border-right: 1px solid #a09b8a;
    }
    
    .admin-tab:first-child {
        margin-left: 0;
        margin-right: -18px;
    }
    
    .admin-tab:last-child {
        margin-right: 0;
    }
    
    .admin-tab:not(.active) {
        z-index: 1;
        opacity: 0.85;
        background: #cec9b6;
    }
    
    .admin-tab.active {
        z-index: 10;
        transform: translateY(1px);
        background: #ece9d8;
        margin-right: -16px;
        margin-left: -16px;
        padding-left: 0.8rem;
        padding-right: 0.8rem;
        position: relative;
        box-shadow: -2px 1px 6px rgba(0,0,0,0.15), 2px 1px 4px rgba(0,0,0,0.1);
    }
    
    .admin-tab.active::before {
        content: '';
        position: absolute;
        left: -4px;
        top: 2px;
        bottom: 2px;
        width: 4px;
        background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
        pointer-events: none;
    }
    
    .admin-tab.active::after {
        content: '';
        position: absolute;
        right: -4px;
        top: 2px;
        bottom: 2px;
        width: 4px;
        background: linear-gradient(to left, rgba(0,0,0,0.1), transparent);
        pointer-events: none;
    }
    
    .admin-tab i {
        margin-right: 4px;
        font-size: 0.7rem;
    }
    
    .admin-tab-content {
        padding: 0.4rem;
        padding-bottom: 0.6rem !important;
    }
    
    .admin-tab-content > div {
        padding: 0.3rem;
    }
    
    .section-title-windows {
        text-align: left !important;
        justify-content: flex-start !important;
        padding: 0.3rem 0.4rem !important;
        margin-bottom: 0.6rem !important;
        font-size: 0.55rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.2rem !important;
        flex-wrap: wrap !important;
    }
    
    .section-title-windows i {
        font-size: 0.65rem !important;
        margin-right: 4px !important;
    }
    
    .section-title-windows small {
        font-size: 0.5rem !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        background: rgba(0,0,0,0.2) !important;
        padding: 0.1rem 0.4rem !important;
        border-radius: 10px !important;
    }
    
    .manage-container {
        max-height: none !important;
        overflow-y: visible !important;
        padding-bottom: 1rem !important;
    }
    
    #propertyList {
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        padding-bottom: 0.8rem !important;
    }
    
    .property-item {
        padding: 0.4rem;
        margin: 0 !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        border-bottom: 1px solid #d4d0c8;
    }
    
    .property-item:last-child { 
        border-bottom: none;
        margin-bottom: 0 !important;
        padding-bottom: 0.25rem !important;
    }
    
    .property-item > div:first-child {
        width: 50px;
        height: 50px;
    }
    
    #propertyList > div:first-child {
        padding: 0.2rem 0.25rem !important;
        margin-bottom: 0.25rem !important;
        gap: 0.15rem !important;
    }
    
    #propertyList > div:first-child span {
        font-size: 0.55rem !important;
        padding: 0.1rem 0.3rem !important;
    }
    
    #propertyList > div:last-child {
        gap: 0.02rem !important;
        margin-top: 0.25rem !important;
        margin-bottom: 0.03rem !important;
        padding: 0.1rem 0.05rem !important;
    }
    
    #propertyList > div:last-child button,
    #propertyList > div:last-child span {
        min-width: 22px !important;
        height: 22px !important;
        padding: 0 0.08rem !important;
        font-size: 0.45rem !important;
    }
    
    #propertyList > div:last-child select {
        margin-left: 0.05rem !important;
        padding: 0.05rem 0.05rem !important;
        font-size: 0.4rem !important;
        height: 20px !important;
        width: 55px !important;
    }
    
    .form-row-2cols {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
    
    .form-group {
        margin-bottom: 0.4rem;
        padding: 0.2rem;
    }
}

.admin-tab:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

select {
    background: #ffffff;
    border: 2px solid;
    border-color: #404040 #ffffff #ffffff #404040;
    border-radius: 0px;
    padding: 0.2rem 0.4rem;
    font-family: 'Courier New', monospace;
}

.form-compact #propertyForm { gap: 0.4rem; }
.form-compact #propertyForm > div { margin-bottom: 0 !important; }
.form-compact #propertyForm input, .form-compact #propertyForm select { padding: 0.35rem 0.45rem; font-size: 0.8rem; }
.form-compact #propertyForm textarea { min-height: 45px; padding: 0.35rem 0.45rem; font-size: 0.8rem; }

/* ========== ESTILOS DO MODAL PDF (extraídos do pdf-unified.js) ========== */

/* Modal principal de seleção de PDFs */
.pdf-selection-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    overflow-y: auto;
}

/* Container interno do modal */
.pdf-selection-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Desktop */
@media (min-width: 769px) {
    .pdf-selection-modal {
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    .pdf-selection-container {
        max-width: 600px;
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        padding: 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .pdf-selection-modal {
        align-items: flex-start;
        justify-content: center;
        padding: 10px;
    }
    .pdf-selection-container {
        max-width: 500px;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 1.2rem;
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* Botão fechar do modal */
.pdf-modal-close-btn {
    position: absolute;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 769px) {
    .pdf-modal-close-btn {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .pdf-modal-close-btn {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

.pdf-modal-close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #c0392b;
}

/* Título do modal */
.pdf-modal-title {
    color: #1a5276;
    margin: 0;
    padding-right: 30px;
}

@media (min-width: 769px) {
    .pdf-modal-title {
        margin-bottom: 1.5rem;
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .pdf-modal-title {
        margin-bottom: 1rem;
        font-size: 1.2rem;
        padding-right: 25px;
    }
}

.pdf-modal-title i {
    margin-right: 8px;
}

/* Descrição do modal */
.pdf-modal-description {
    color: #666;
    line-height: 1.4;
}

@media (min-width: 769px) {
    .pdf-modal-description {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .pdf-modal-description {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
}

/* Container da lista de PDFs */
.pdf-items-container {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .pdf-items-container {
        margin-bottom: 1.2rem;
    }
}

/* Item da lista de PDF */
.pdf-list-item {
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid #1a5276;
}

.pdf-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

@media (min-width: 769px) {
    .pdf-list-item {
        padding: 1rem;
        margin-bottom: 0.8rem;
        flex-wrap: nowrap;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .pdf-list-item {
        padding: 0.8rem;
        margin-bottom: 0.6rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Informações do PDF */
.pdf-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.pdf-item-icon {
    display: flex;
    align-items: center;
}

@media (min-width: 769px) {
    .pdf-item-icon {
        gap: 10px;
    }
    .pdf-item-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .pdf-item-icon {
        gap: 8px;
    }
    .pdf-item-icon i {
        font-size: 1.2rem;
    }
}

.pdf-item-name {
    min-width: 0;
}

.pdf-item-name strong {
    display: block;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 769px) {
    .pdf-item-name strong {
        font-size: 1rem;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .pdf-item-name strong {
        font-size: 0.9rem;
        max-width: 200px;
    }
}

.pdf-item-meta {
    color: #7f8c8d;
}

@media (min-width: 769px) {
    .pdf-item-meta {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .pdf-item-meta {
        font-size: 0.7rem;
    }
}

/* Botão visualizar PDF */
.pdf-view-btn {
    background: #1a5276;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.pdf-view-btn:hover {
    background: #0e3d5c;
    transform: scale(1.02);
}

.pdf-view-btn:active {
    transform: scale(0.98);
}

@media (min-width: 769px) {
    .pdf-view-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .pdf-view-btn span {
        display: inline;
    }
}

@media (max-width: 768px) {
    .pdf-view-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    .pdf-view-btn span {
        display: none;
    }
}

/* Footer do modal */
.pdf-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

@media (min-width: 769px) {
    .pdf-modal-footer {
        gap: 0;
    }
}

@media (max-width: 768px) {
    .pdf-modal-footer {
        gap: 0.5rem;
    }
}

.pdf-modal-footer small {
    color: #95a5a6;
}

@media (min-width: 769px) {
    .pdf-modal-footer small {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .pdf-modal-footer small {
        font-size: 0.75rem;
        order: 2;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
}

.pdf-download-all-btn {
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.pdf-download-all-btn:hover {
    background: #219653;
    transform: scale(1.02);
}

@media (min-width: 769px) {
    .pdf-download-all-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .pdf-download-all-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        order: 1;
    }
    .pdf-download-all-btn span {
        display: inline;
    }
}

/* Mensagem de nenhum documento */
.pdf-empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.pdf-empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ========== MOBILE: LAYOUT DIFERENCIADO ENTRE ABAS ========== */
/* 
   REGRA 1: ABA GERENCIAR (manage-tab) - ocupa 100% da largura, sem margens
   REGRA 2: ABA INCLUIR/EDITAR (form-tab) - layout original preservado
     - Campos Título e Preço na MESMA LINHA (grid 1fr 1fr)
     - Espaçamento justo (gap reduzido)
     - Estilo consistente com o original
     - CORREÇÃO: Estabilidade durante edição (mesmo com classes dinâmicas)
*/

/* Ajuste base do painel em mobile */
@media (max-width: 768px) {
    .admin-panel {
        margin: 1rem 0 !important;
        padding: 0.5rem !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        width: 100% !important;
    }
    
    /* Ajuste do botão toggle para mobile */
    .admin-toggle {
        bottom: 15px !important;
        right: 15px !important;
        width: 44px !important;
        height: 44px !important;
    }
}

/* ESTILO ESPECÍFICO PARA ABA GERENCIAR (100% largura, sem margens) */
@media (max-width: 768px) {
    #manage-tab.active,
    #manage-tab.active > div {
        width: 100% !important;
        padding: 0.25rem !important;
        margin: 0 !important;
    }
    
    #manage-tab.active .manage-container {
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    #manage-tab.active #propertyList {
        width: 100% !important;
    }
    
    #manage-tab.active .property-item {
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
    }
}

/* ESTILO ESPECÍFICO PARA ABA INCLUIR/EDITAR (layout original restaurado) */
/* CORREÇÃO: Maior especificidade para prevenir desajustes durante edição */
@media (max-width: 768px) {
    /* Container principal da aba */
    #form-tab.active,
    #form-tab.active[style*="display"],
    #form-tab.active[class*="active"] {
        padding: 0 !important;
    }
    
    /* Container interno com o formulário */
    #form-tab.active > div,
    #form-tab.active > div[style*="background"],
    #form-tab.active > div:first-child {
        padding: 0.5rem !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* FORÇAR layout de grid para a linha de Título e Preço */
    #form-tab.active .form-row-2cols,
    #form-tab.active div.form-row-2cols,
    #form-tab.active .form-row-2cols[class*="row"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.15rem !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Garantir que os grupos de formulário mantenham o layout justo */
    #form-tab.active .form-row-2cols .form-group,
    #form-tab.active .form-row-2cols div.form-group {
        margin-bottom: 0 !important;
        padding: 0.15rem !important;
        width: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Espaçamento justo entre os campos (estilo C/C++) */
    #form-tab.active .form-group,
    #form-tab.active div.form-group {
        margin-bottom: 0.15rem !important;
        padding: 0.15rem !important;
    }
    
    /* Remover gaps extras entre campos */
    #form-tab.active #propertyForm,
    #form-tab.active form#propertyForm {
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Campos com padding reduzido para manter justaposição */
    #form-tab.active #propertyForm input,
    #form-tab.active #propertyForm textarea,
    #form-tab.active #propertyForm select,
    #form-tab.active form#propertyForm input,
    #form-tab.active form#propertyForm textarea,
    #form-tab.active form#propertyForm select {
        padding: 0.35rem 0.45rem !important;
        font-size: 0.75rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Botões com layout justo */
    #form-tab.active #propertyForm button[type="submit"],
    #form-tab.active #cancelEditBtn,
    #form-tab.active form#propertyForm button[type="submit"],
    #form-tab.active button#cancelEditBtn {
        width: 100% !important;
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
        margin-top: 0.15rem !important;
        box-sizing: border-box !important;
    }
    
    /* Áreas de upload com padding reduzido */
    #form-tab.active #uploadArea,
    #form-tab.active #pdfUploadArea {
        padding: 0.5rem !important;
        margin: 0.25rem 0 !important;
    }
    
    /* Área de preview com espaçamento justo */
    #form-tab.active #uploadPreview,
    #form-tab.active #pdfUploadPreview {
        margin: 0.25rem 0 !important;
        padding: 0.25rem !important;
    }
    
    /* Título da seção com espaçamento ajustado */
    #form-tab.active .section-title-windows {
        margin: 0.25rem 0 0.5rem 0 !important;
        padding: 0.3rem !important;
    }
    
    /* Container do formulário sem margens extras */
    #form-tab.active #propertyForm,
    #form-tab.active form {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Checkbox com espaçamento justo */
    #form-tab.active .form-group label[style*="display:flex"],
    #form-tab.active label[for="propHasVideo"] {
        margin: 0 !important;
        padding: 0.1rem 0 !important;
    }
}
