/* Estilos para a página de login */
.login-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.login-card .card-title {
    font-family: 'Playfair Display', serif;
    color: #2c2c2c;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.login-card .form-label {
    font-weight: 500;
    color: #2c2c2c;
    margin-bottom: 0.5rem;
}

.login-card .form-control {
    border-radius: 10px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
}

.login-card .btn-primary {
    border-radius: 10px;
    padding: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.login-card .alert {
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .login-card {
        padding: 2rem;
    }
    
    .login-card .card-title {
        font-size: 1.75rem;
    }
}

/* Estilos gerais */
body {
    font-size: .875rem;
    background-color: #f8f9fc;
    padding-top: 56px; /* Altura do navbar */
}

/* Navbar */
.navbar {
    height: 56px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px; /* Altura do navbar */
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0.5rem 0; /* Reduzido o padding-top */
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #fff;
    width: 16.666667%;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    color: #2470dc;
    background-color: rgba(36, 112, 220, 0.1);
}

.sidebar .nav-link.active {
    color: #2470dc;
    background-color: rgba(36, 112, 220, 0.1);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

/* Conteúdo principal */
main {
    padding-top: 1.5rem;
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

@media (min-width: 768px) {
    main {
        margin-left: 16.666667%; /* Largura da sidebar */
    }
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Tabela */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: #4e73df;
    background-color: #f8f9fc;
}

/* Botões */
.btn-group .btn {
    padding: 0.25rem 0.5rem;
}

/* Animações */
.nav-link, .btn {
    transition: all 0.2s ease-in-out;
}

/* Cores personalizadas */
.bg-primary {
    background-color: #4e73df !important;
}

.text-primary {
    color: #4e73df !important;
}

.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.5rem 1rem;
}

.sidebar .nav-link.active {
    color: #2470dc;
}

.sidebar .nav-link:hover {
    color: #2470dc;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

.sidebar .nav-link .bi-chevron-down {
    margin-right: 0;
    transition: transform 0.2s;
}

.sidebar .nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar .nav-link[data-bs-toggle="collapse"] {
    position: relative;
}

.sidebar .nav-link[data-bs-toggle="collapse"]::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1rem;
    background: linear-gradient(to right, transparent, #fff);
}

.sidebar .collapse .nav-link {
    padding-left: 2rem;
}

@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
    }
}

/* Remove a linha/borda lateral do sidebar no offcanvas (mobile) */
.offcanvas .sidebar {
    border-right: none !important;
    box-shadow: none !important;
}

/* Estilos para fotos de imóveis */
.foto-item {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
}

.foto-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.foto-item.foto-principal {
    border-color: #ffc107;
    box-shadow: 0 0 0 2px #ffc107, 0 4px 12px rgba(255, 193, 7, 0.3);
}

.foto-item.foto-principal::before {
    content: 'PRINCIPAL';
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ffc107;
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
}

.foto-preview-item {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
}

.foto-preview-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Botões de controle das fotos */
.foto-item .btn,
.foto-preview-item .btn {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.foto-item:hover .btn,
.foto-preview-item:hover .btn {
    opacity: 1;
}

.foto-item .btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.foto-item .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.foto-item .btn-outline-primary {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    color: #007bff;
}

.foto-item .btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

/* Animação para reordenação */
.foto-item {
    animation: fadeIn 0.3s ease;
}

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

/* Destaque para a foto principal (primeira) no drag-and-drop */
.fotos-existentes .foto-item.principal, 
#previewContainer .foto-preview-item.principal {
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 0 2px #ffc107, 0 4px 12px rgba(255, 193, 7, 0.3);
    position: relative;
}
.fotos-existentes .foto-item.principal::before, 
#previewContainer .foto-preview-item.principal::before {
    content: 'PRINCIPAL';
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ffc107;
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
}