/* Arquivo refatorado para usar CSS dinâmico - as variáveis são carregadas de /css */

body {
    background-color: var(--cinza-claro);
}

.bg-orange {
    background-color: var(--cor-principal);
}

.bg-blue,
.navbar.fixed-top, .card-header {
    background: linear-gradient(135deg, var(--preto) 0%, var(--cinza-escuro) 100%) !important;
}

#slide-out {
    background: linear-gradient(135deg, var(--preto) 0%, var(--cinza-escuro) 100%) !important;
}
.white-skin .side-nav .collapsible li:first-child {
    border-top: 1px solid var(--cinza-claro);
}
.white-skin .side-nav .collapsible li {
    border-bottom: 1px solid var(--cinza-claro);
}
.white-skin .side-nav .collapsible li .collapsible-header,
.white-skin .side-nav .fa {
    color: var(--branco);
    font-size: 16px;
}
.white-skin .side-nav .collapsible li a:hover,
.white-skin .side-nav .collapsible li a:hover .fa,
.white-skin .side-nav .collapsible li .collapsible-header.active,
.white-skin .side-nav .collapsible li .collapsible-body a:hover,
.white-skin .side-nav .collapsible li .collapsible-body a.active {
    color: var(--cor-principal);
}
.invalid_value label {
    color: #dc3545 !important;
}
.invalid_value small.error {
    color: #dc3545;
}
.invalid_value input,
.invalid_value select,
.invalid_value textarea {
    border-bottom: 1px solid #dc3545 !important;
}
.range_inputs .md-form {
    padding: 0px;
    margin: 10px 0px;
}
.range_inputs .md-form input {
    width: 100%;
}
.range_inputs .buttons {
    padding: 0px !important;
    width: 100%;
}
.range_inputs .buttons {
    padding: 0px;
}
.range_inputs .buttons button{
    padding: 0.5rem 0.6rem;
    margin: 0px 0px 3px 0px;
    width: 100%;
    box-sizing: border-box;
}

/*dashboard*/
.cascading-admin-card .admin-up .fa {
    padding: 0.7rem;
    min-width: 48px;
    text-align: center;
}
.cascading-admin-card .card-body-percent {
    padding: 0px 5px 5px 5px;
}
.cascading-admin-card .card-body-percent .progress {
    margin-bottom: 3px;
}
.card-graph {
    height: 300px;
}
.btn-group-dashboard button {
    background-color: var(--cinza-escuro);
    color: var(--branco);
    padding: .4rem 1.6rem !important;
    border: none;
    transition: all 0.3s ease;
}
.btn-group-dashboard button.active {
    background: linear-gradient(45deg, var(--cor-principal) 0%, #D4B876 100%) !important;
    color: var(--branco);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(183, 154, 95, 0.3);
}
.chart-nodata-message {
    margin-top: 135px;
    color: var(--cinza-escuro);
}
.card .card-body .card-text {
    font-size: 0.8rem;
}
.btn-list {
    padding: 0.5rem 0.8rem;
    font-size: .64rem;
}

.form-row label {
    margin-bottom: 0px;
}
.form-row select {
    display: block !important;
}
.form-row .btn-search-form-action {
    height: 38px;
    margin-top: 23px;
    line-height: 38px;
    padding: 0px 15px;
}
.clickable-row:hover {
    background-color: var(--cinza-claro) !important;
}
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.in-execution {
    color: var(--cor-principal); 
    font-size: 12px; 
    line-height: 12px;
    font-weight: 600;
}
/* DETALHES DA VENDA*/
#order-resume .resume-field-title {
    color: var(--cinza-escuro);
    font-size: 14px;
    font-weight: 500;
}
#order-resume .resume-field-value {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--preto);
}
#order-resume .money-label .symbol {
    font-size: 14px;
    margin-right: 5px;
    font-weight: 400;
    color: var(--cor-principal);
}
#order-resume .money-label .amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--cor-principal);
}
#order-resume .sub-info .resume-field-title {
    font-size: 12px !important;
}
#order-resume .sub-info .resume-field-value {
    font-size: 12px !important;
}

#modal-btn-receipt {
    text-decoration: none;
    margin-bottom: 15px;
}
#modal-btn-receipt div {
    width: 100%;
    border: 3px dashed var(--cinza-escuro);
    color: var(--cinza-escuro);
    font-size: 26px;
    box-sizing: border-box;
    padding-top: 30px;
    height: 150px;
    transition: all 0.3s ease;
}
#modal-btn-receipt i {
    color: var(--cinza-escuro);
    transition: color 0.3s ease;
}
#modal-btn-receipt:hover div {
    border: 3px dashed var(--cor-principal);
    color: var(--cor-principal);
}
#modal-btn-receipt:hover i {
    color: var(--cor-principal);
}
#modal-btn-receipt div span small {
    font-size: 18px;
}
#modal-btn-receipt div i {
    font-size: 46px;
}

/* Sobrescrever CSS do MDB para manter selects normais */
select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: #495057 !important;
}

select:focus {
    border-color: var(--cor-principal) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(183, 154, 95, 0.25) !important;
}

/* Ocultar elementos do MDB relacionados aos selects */
.select-wrapper {
    position: relative !important;
}

.select-wrapper input.select-dropdown {
    display: none !important;
}

.select-wrapper .caret {
    display: none !important;
}

.select-wrapper ul.dropdown-content {
    display: none !important;
}

/* Garantir que labels funcionem corretamente */
.form-group label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    color: #495057 !important;
    font-weight: 500 !important;
}

/* ===== ESTILOS PADRONIZADOS PARA FORMULÁRIOS ===== */

/* Seções de formulário */
.form-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-section h5,
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cor-principal);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f1f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--cor-principal);
}

/* Campos obrigatórios */
.required-field::after {
    content: ' *';
    color: #dc3545;
}

/* Botões customizados com paleta de cores */
.btn-custom-primary {
    background: linear-gradient(45deg, var(--cor-principal) 0%, #D4B876 100%);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-custom-primary:hover {
    background: linear-gradient(45deg, #D4B876 0%, var(--cor-principal) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(183, 154, 95, 0.3);
}

.btn-custom-success {
    background: linear-gradient(45deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-custom-success:hover {
    background: linear-gradient(45deg, #20c997 0%, #28a745 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-custom-secondary {
    background: linear-gradient(45deg, var(--cinza-escuro) 0%, #6c757d 100%);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-custom-secondary:hover {
    background: linear-gradient(45deg, #6c757d 0%, var(--cinza-escuro) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Área de ações dos formulários - sempre à direita e no final */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Preview de ícones para serviços */
.preview-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--cor-principal) 0%, #D4B876 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto;
}

.icon-selector {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
}

.icon-option {
    cursor: pointer;
    padding: 10px;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-option:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.icon-option.selected {
    background-color: #e3f2fd;
    border-color: var(--cor-principal);
}

.icon-option i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* Preview de slug */
.slug-preview {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    border-left: 3px solid var(--cor-principal);
}

/* Upload de arquivos */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: var(--cor-principal);
    background: #f0f8ff;
}

.upload-area.dragover {
    border-color: var(--cor-principal);
    background: #e3f2fd;
}

/* Upload System */
.upload-preview {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-preview:hover {
    border-color: var(--cor-principal);
    background: #f0f8ff;
}

.upload-preview.has-image {
    border-color: var(--cor-principal);
    background: white;
    padding: 10px;
}

.upload-preview.dragover {
    border-color: var(--cor-principal);
    background: #e8f5e9;
    transform: scale(1.02);
}

/* Upload Placeholder */
.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.upload-text {
    text-align: center;
}

.upload-text strong {
    color: #333;
    font-size: 14px;
}

.upload-text .text-muted {
    font-size: 12px;
    margin-top: 5px;
}

/* Upload Overlay (para imagens existentes) */
.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
}

.upload-preview:hover .upload-overlay {
    opacity: 1;
}

.upload-overlay i {
    font-size: 24px;
    margin-bottom: 8px;
}

.upload-overlay span {
    font-size: 12px;
    text-align: center;
}

/* Preview Image */
.preview-image {
    max-width: 200px;
    max-height: 100px;
    border-radius: 4px;
    margin-bottom: 0;
    display: block;
    width: auto;
    height: auto;
}

/* Preview de imagens */
.images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-item {
    position: relative;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-remove:hover {
    background: #dc3545;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

/* Configuração de marca d'água */
.watermark-config {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.watermark-config h6 {
    color: var(--cor-principal);
    font-weight: 600;
    margin-bottom: 15px;
}

/* Range inputs customizados */
.form-range::-webkit-slider-thumb {
    background-color: var(--cor-principal);
}

.form-range::-moz-range-thumb {
    background-color: var(--cor-principal);
    border: none;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(183, 154, 95, 0.25);
}

/* Paletas de cores */
.palettes-container {
    margin-top: 15px;
}

.palette-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    height: 100%;
}

.palette-card:hover {
    border-color: var(--cor-principal);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(183, 154, 95, 0.15);
}

.palette-card.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.2);
}

.palette-colors {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.color-square {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.palette-card:hover .color-square {
    transform: scale(1.1);
}

.palette-info {
    text-align: center;
}

.palette-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 16px;
}

.palette-desc {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.4;
}

.current-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Preview de cores */
.color-preview {
    width: 50px;
    height: 35px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.opacity-display {
    font-weight: 600;
    color: var(--cor-principal);
    margin-left: 10px;
}

/* Gap para botões em linha */
.d-flex.gap-3 > * {
    margin-right: 15px;
}

.d-flex.gap-3 > *:last-child {
    margin-right: 0;
}

/* ===== SISTEMA DE TABELAS RESPONSIVAS ===== */

/* Estilos base para listagens */
.imovel-card {
    transition: transform 0.2s;
}

.imovel-card:hover {
    transform: translateY(-2px);
}

.imovel-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

.destaque-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

/* Seção de filtros responsivos */
.filters-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.btn-actions {
    white-space: nowrap;
}

.btn-group .btn {
    margin-right: 0;
}

.btn-group .btn+.btn {
    margin-left: -1px;
}

.gap-2 {
    gap: 0.5rem !important;
}

.table th {
    border-top: none;
    background-color: #f8f9fa;
    font-weight: 600;
}

.imovel-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.btn-filter {
    min-width: 42px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-filter i {
    font-size: 14px;
}

.btn-filter span {
    display: none;
}

/* Responsividade da tabela */
.table-responsive {
    border: none;
}

/* ===== RESPONSIVIDADE MOBILE (até 767px) ===== */
@media (max-width: 767.98px) {
    /* Filtros responsivos */
    .filters-section {
        padding: 15px;
    }
    
    .filters-section .col-md-4,
    .filters-section .col-md-3,
    .filters-section .col-md-2 {
        margin-bottom: 15px;
    }
    
    .filters-section .col-md-2:last-child {
        margin-bottom: 0;
    }
    
    .btn-filter {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn-filter:last-child {
        margin-bottom: 0;
    }

    /* Tabelas como cards no mobile */
    .table-responsive {
        overflow-x: visible;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody {
        display: block;
    }
    
    .table tbody tr {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        background: white;
    }
    
    .table tbody td {
        display: block;
        text-align: left !important;
        border: none;
        padding: 8px 0;
        position: relative;
    }
    
    .table tbody td:before {
        content: attr(data-label);
        font-weight: bold;
        color: #495057;
        display: inline-block;
        width: 120px;
        margin-right: 10px;
    }
    
    /* Elementos específicos para mobile */
    .mobile-image-container {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .mobile-image-container .imovel-thumb {
        width: 80px;
        height: 60px;
        border-radius: 8px;
    }
    
    .mobile-title {
        font-size: 1.1em;
        font-weight: bold;
        color: var(--cor-principal);
        margin-bottom: 10px;
        text-align: center;
    }
    
    .mobile-actions {
        text-align: center;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #eee;
    }
    
    .btn-group-mobile .btn {
        margin: 0 2px 5px 2px;
        min-width: 45px;
    }

    /* Layout geral mobile */
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    /* Paginação responsiva */
    .pagination .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* ===== RESPONSIVIDADE TABLET (768px - 991px) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .table th:nth-child(3), 
    .table td:nth-child(3) {
        display: none; /* Esconder coluna "Tipo" */
    }
    
    .table th:nth-child(4),
    .table td:nth-child(4) {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===== RESPONSIVIDADE DESKTOP (992px+) ===== */
@media (min-width: 992px) {
    .btn-filter {
        min-width: auto;
        padding: 8px 16px;
    }

    .btn-filter span {
        display: inline;
        margin-left: 4px;
    }
}

/* ===== MODALS RESPONSIVOS ===== */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 20px;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* ===== ESTILOS PARA CARDS DE ESTATÍSTICAS RESPONSIVOS ===== */
@media (max-width: 767.98px) {
    .row .col-6 .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-text.small {
        font-size: 0.8rem;
    }
}

/* ===== ESTILOS ESPECÍFICOS PARA SERVIÇOS ===== */

/* Ícones de serviços na tabela */
.servico-icon-table {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--cor-principal) 0%, #D4B876 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.servico-icon-mobile {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--cor-principal) 0%, #D4B876 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto;
}

/* Melhorias para ícones no mobile */
@media (max-width: 767.98px) {
    .mobile-image-container {
        margin-bottom: 15px;
    }
}
