body {
    min-height: 100vh;
}

/* Oculta a barra de rolagem mantendo a funcionalidade */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* Layout fixo header/footer */
.app-body {
        padding-top: var(--app-header-height, 64px);
        padding-bottom: var(--app-footer-height, 35px);
}

.app-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        height: var(--app-header-height, 64px);
        display: flex;
        align-items: stretch;
}

/* Logo moderno */
.app-header .navbar-brand {
    font-size: 1rem;
    text-decoration: none;
}

.brand-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Botões pill do menu */
.navbar-nav .nav-link.rounded-pill {
    transition: all 0.2s ease;
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem !important;
    white-space: nowrap;
}

.navbar-nav .gap-1 {
    gap: 0.25rem !important;
}

.navbar-nav .nav-link.rounded-pill:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.rounded-pill.active {
    background-color: rgba(255, 255, 255, 0.25);
    font-weight: 500;
}

@media (min-width: 576px) {
        .app-header .navbar-brand { font-size: 1.05rem; }
        .brand-name { font-size: 1.15rem; }
}
@media (min-width: 992px) {
        .app-header .navbar-brand { font-size: 1.15rem; }
        .brand-name { font-size: 1.25rem; }
        .brand-icon { font-size: 2rem; }
}

/* Menu mobile com fundo preto */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #000 !important;
        margin-top: 0.5rem;
        padding: 1rem;
        border-radius: 0.375rem;
    }
    
    .navbar-nav .nav-link {
        color: #fff !important;
        padding: 0.75rem 1rem;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 0.25rem;
    }
    
    .navbar-nav .nav-link.active {
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 0.25rem;
    }
}

.app-header-separator { display: none; }

.app-main {
    min-height: calc(100vh - var(--app-header-height, 64px) - var(--app-footer-height, 35px));
    /* Evita que conteúdo (ex.: calendário) fique oculto atrás do rodapé fixo */
    padding-bottom: calc(var(--app-footer-height, 35px) + 16px);
}

.app-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--app-footer-height, 35px);
        text-align: center;
        padding: .5rem 1rem;
        line-height: 1.2;
        background-color: #000 !important;
        color: #fff !important;
        opacity: 1 !important;
        z-index: 1050; /* Garante que o rodapé fique SEMPRE acima do calendário */
}

/* Modais altos: garantir rolagem do conteúdo e footer visível no desktop também */
.vh-modal .modal-dialog.modal-dialog-scrollable {
    max-width: min(900px, 95vw);
    margin: 1rem auto;
    height: calc(100vh - 2rem); /* Necessário para modal-dialog-scrollable */
}
.vh-modal .modal-dialog.modal-dialog-scrollable .modal-content {
    max-height: 100%;
    overflow: hidden; /* Bootstrap controla o overflow */
}
.vh-modal .modal-dialog.modal-dialog-scrollable .modal-body {
    overflow-y: auto; /* Bootstrap ativa o scroll aqui */
    -webkit-overflow-scrolling: touch; /* Scroll suave no iOS */
}
.vh-modal .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #eee;
}

[data-bs-theme="dark"] .vh-modal .modal-footer {
    background: #1e293b;
    border-top-color: #334155;
}

/* Evitar sobreposição do footer fixo do app quando um modal está aberto */
.modal-open .app-footer { display: none !important; }

/* Spinner de carregamento global (discreto) */
.app-loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    pointer-events: none;
}
.app-loading-overlay .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}
.app-loading-overlay.d-none { display: none !important; }

/* Melhorias responsivas gerais */
.table-responsive-sm-wrapper { width: 100%; overflow-x: auto; }
.table { font-size: .9rem; }
@media (max-width: 576px) {
    .table thead { display: none; }
    .table tbody tr { display: block; background: #fff; margin-bottom: .75rem; border: 1px solid #e9ecef; border-radius: .5rem; padding: .5rem .75rem; }
    .table tbody td { display: flex; justify-content: space-between; padding: .35rem .25rem; border-top: none; }
    .table tbody td::before { content: attr(data-label); font-weight: 600; color: #495057; padding-right: .75rem; }
    .table-hover tbody tr:hover { transform: scale(1.01); box-shadow: 0 0.2rem 0.6rem rgba(0,0,0,.06); }
}

@media (max-width: 576px) {
    [data-bs-theme="dark"] .table tbody tr { 
        background: #1e293b !important; 
        border-color: #334155; 
    }
    [data-bs-theme="dark"] .table tbody td::before { 
        color: #94a3b8; 
    }
    [data-bs-theme="dark"] .table-hover tbody tr:hover { 
        box-shadow: 0 0.2rem 0.6rem rgba(0,0,0,.3); 
    }
    [data-bs-theme="dark"] .modal-footer {
        background: #1e293b;
        border-top-color: #334155;
    }
}

/* Ajustes de formulários em mobile */
@media (max-width: 576px) {
    form .row > [class*='col-'] { margin-bottom: .75rem; }
    .btn { font-size: .9rem; }
    .modal .btn { font-size: .85rem; }
    .modal-title { font-size: 1rem; }

    /* Modais grandes e scrolláveis ocupam toda a tela e permitem rolar */
    .modal-dialog,
    .modal-dialog-scrollable,
    .modal-lg,
    .modal-xl {
        max-width: 100vw;
        margin: 0;
        height: 100vh;
        display: flex;
        align-items: center;
    }
    .modal-content {
        max-height: 100vh;
        overflow-y: auto;
        border-radius: 0.75rem;
    }
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        z-index: 2;
        border-top: 1px solid #eee;
    }
    [data-bs-theme="dark"] .modal-footer {
        background: #1e293b;
        border-top-color: #334155;
    }
}

/* Espaços extra para listas em mobile */
@media (max-width: 576px) {
    .payment-highlight-item { padding: .75rem 0; }
    .inventory-item .card-body { padding: .75rem .85rem; }
    .apartment-card { margin-bottom: .75rem; }
}

/* Scroll suave para página com header fixo */
html { scroll-padding-top: var(--app-header-height, 64px); }

.brand-lockup {
    max-width: 220px;
    width: 100%;
    height: auto;
}

.dashboard-hero-brand {
    max-width: 260px;
}

.dashboard-hero-brand img {
    width: 100%;
    height: auto;
}

.navbar-brand {
    letter-spacing: 0.05em;
}

.nav-link.active {
    font-weight: 600;
}

.section-hidden {
    display: none !important;
}

.table-actions {
    gap: 0.5rem;
    display: flex;
    justify-content: center;
}

.badge-status {
    text-transform: capitalize;
}

#calendar {
    min-height: 600px;
    /* Garante respiro extra acima do rodapé */
    margin-bottom: 1rem;
    /* Força o calendário a ficar abaixo do rodapé fixo */
    position: relative;
    z-index: 1;
}

.offcanvas.wide-offcanvas {
    width: min(1100px, 100%);
}

.card.metric-card {
    border: none;
    border-radius: 1rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: var(--metric-gradient, linear-gradient(135deg, #0d6efd, #4dabf7));
    box-shadow: 0 0.25rem 1rem rgba(13, 110, 253, 0.25);
}

.card.metric-card .card-body {
    position: relative;
    z-index: 1;
}

.card.metric-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.25), transparent 60%);
    opacity: 0.8;
    z-index: 0;
}

.metric-card__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    font-size: 1.35rem;
}

.metric-card__label {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.metric-card__value {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 0;
}

.metric-card__subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.metric-card.metric-card--checkins {
    --metric-gradient: linear-gradient(135deg, #2563eb, #38bdf8);
}

.metric-card.metric-card--checkouts {
    --metric-gradient: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 0.25rem 1rem rgba(124, 58, 237, 0.25);
}

.metric-card.metric-card--net-profit {
    --metric-gradient: linear-gradient(135deg, #16a34a, #4ade80);
    box-shadow: 0 0.25rem 1rem rgba(22, 163, 74, 0.25);
}

.metric-card.metric-card--cleanings {
    --metric-gradient: linear-gradient(135deg, #f97316, #fb923c);
    box-shadow: 0 0.25rem 1rem rgba(249, 115, 22, 0.25);
}

/* Dark Mode Theme - Paleta de cores coerente */
[data-bs-theme="dark"] {
    color-scheme: dark;
}

/* Regras gerais para sobrescrever backgrounds brancos */
[data-bs-theme="dark"] * {
    /* Remove qualquer background branco explícito */
}

[data-bs-theme="dark"] [style*="background-color: #fff"],
[data-bs-theme="dark"] [style*="background-color:#fff"],
[data-bs-theme="dark"] [style*="background: #fff"],
[data-bs-theme="dark"] [style*="background:#fff"],
[data-bs-theme="dark"] [style*="background-color: white"],
[data-bs-theme="dark"] [style*="background-color:white"],
[data-bs-theme="dark"] [style*="background: white"],
[data-bs-theme="dark"] [style*="background:white"] {
    background-color: #1e293b !important;
    background: #1e293b !important;
}

[data-bs-theme="dark"] body {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .card {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .navbar-dark {
    background-color: #0c0f1a !important;
}

[data-bs-theme="dark"] .app-footer {
    background-color: #0c0f1a !important;
    border-top: 1px solid #1e293b;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #334155;
    background-color: #1e293b;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #0f172a;
    color: #e2e8f0;
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

[data-bs-theme="dark"] .table {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(15, 23, 42, 0.5);
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > td {
    background-color: rgba(30, 41, 59, 0.8);
}

[data-bs-theme="dark"] .table-bordered {
    border-color: #334155;
}

[data-bs-theme="dark"] .table-bordered > :not(caption) > * > * {
    border-color: #334155;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-bs-theme="dark"] .list-group-item-action:hover {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .offcanvas {
    background-color: #1e293b;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .offcanvas-header {
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .toast {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-bs-theme="dark"] .toast-header {
    background-color: #0f172a;
    color: #e2e8f0;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .navbar-collapse {
    background-color: #0c0f1a !important;
}

[data-bs-theme="dark"] .cookie-consent {
    background-color: #0c0f1a !important;
    border-top-color: #3b82f6;
}

[data-bs-theme="dark"] .badge.bg-light {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #1e293b !important;
}

/* Bootstrap 5 usa variáveis CSS para cores de tabela — é preciso sobrescrevê-las diretamente */

[data-bs-theme="dark"] .table-light {
    --bs-table-color: #e2e8f0;
    --bs-table-bg: #1e293b;
    --bs-table-border-color: #334155;
    --bs-table-striped-bg: #243040;
    --bs-table-striped-color: #e2e8f0;
    --bs-table-active-bg: #263244;
    --bs-table-active-color: #e2e8f0;
    --bs-table-hover-bg: #263244;
    --bs-table-hover-color: #e2e8f0;
    color: #e2e8f0;
    border-color: #334155;
}

[data-bs-theme="dark"] .table-secondary {
    --bs-table-color: #e2e8f0;
    --bs-table-bg: #1f2937;
    --bs-table-border-color: #334155;
    --bs-table-striped-bg: #243040;
    --bs-table-striped-color: #e2e8f0;
    --bs-table-active-bg: #263244;
    --bs-table-active-color: #e2e8f0;
    --bs-table-hover-bg: #263244;
    --bs-table-hover-color: #e2e8f0;
    color: #e2e8f0;
    border-color: #334155;
}

[data-bs-theme="dark"] .table-warning {
    --bs-table-color: #fef3c7;
    --bs-table-bg: rgba(60, 45, 0, 0.85);
    --bs-table-border-color: rgba(251, 191, 36, 0.4);
    --bs-table-striped-bg: rgba(70, 52, 0, 0.85);
    --bs-table-striped-color: #fef3c7;
    --bs-table-active-bg: rgba(80, 60, 0, 0.85);
    --bs-table-active-color: #fef3c7;
    --bs-table-hover-bg: rgba(80, 60, 0, 0.85);
    --bs-table-hover-color: #fef3c7;
    color: #fef3c7;
    border-color: rgba(251, 191, 36, 0.4);
}

[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: #475569;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .btn-outline-light {
    border-color: #475569;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .btn-outline-light:hover {
    background-color: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}

[data-bs-theme="dark"] .card-header {
    background-color: #0f172a;
    color: #e2e8f0;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #0f172a;
    color: #e2e8f0;
    border-top-color: #334155;
}

[data-bs-theme="dark"] hr {
    border-color: #334155;
    opacity: 1;
}

[data-bs-theme="dark"] .border {
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .border-top {
    border-top-color: #334155 !important;
}

[data-bs-theme="dark"] .border-bottom {
    border-bottom-color: #334155 !important;
}

[data-bs-theme="dark"] .border-start {
    border-left-color: #334155 !important;
}

[data-bs-theme="dark"] .border-end {
    border-right-color: #334155 !important;
}

[data-bs-theme="dark"] .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .inventory-list .inventory-item {
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .inventory-list .inventory-item .card-body {
    background-color: #1e293b;
}

[data-bs-theme="dark"] .app-loading-overlay .spinner-border {
    border-color: #3b82f6;
    border-right-color: transparent;
}

/* FullCalendar - Modo Escuro */
[data-bs-theme="dark"] .fc {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .fc-theme-standard td,
[data-bs-theme="dark"] .fc-theme-standard th {
    border-color: #334155;
}

[data-bs-theme="dark"] .fc-theme-standard .fc-scrollgrid {
    border-color: #334155;
    background-color: #1e293b;
}

[data-bs-theme="dark"] .fc-daygrid-day {
    background-color: #1e293b;
}

[data-bs-theme="dark"] .fc-daygrid-day.fc-day-today {
    background-color: rgba(59, 130, 246, 0.1);
}

[data-bs-theme="dark"] .fc-col-header-cell {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .fc-button {
    background-color: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .fc-button:hover {
    background-color: #475569;
    border-color: #64748b;
}

[data-bs-theme="dark"] .fc-button-primary:not(:disabled):active,
[data-bs-theme="dark"] .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

[data-bs-theme="dark"] .fc-toolbar-title {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .fc-event {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .fc-event-title {
    color: #fff;
}

/* Reservas - Modo Escuro */
[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #94a3b8;
    border-color: transparent;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: #475569;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #1e293b;
    border-color: #334155 #334155 #1e293b;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .payment-highlight-item {
    background-color: transparent;
}

[data-bs-theme="dark"] .btn-group .btn-check:checked + .btn-outline-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

[data-bs-theme="dark"] .alert {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fde047;
}

[data-bs-theme="dark"] .alert-info {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] .navbar-toggler {
    border-color: #475569;
}

[data-bs-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28226, 232, 240, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] .rounded-3.bg-light {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .p-3.bg-light {
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .card-header.bg-light {
    background-color: #0f172a !important;
    border-bottom-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .card-header.bg-white {
    background-color: #0f172a !important;
    border-bottom-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .table thead {
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .table thead th {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .table tbody {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .table tbody td {
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .table tbody tr {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover td {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

[data-bs-theme="dark"] .app-section {
    background-color: transparent;
}

[data-bs-theme="dark"] .container-fluid {
    background-color: transparent;
}

[data-bs-theme="dark"] .container {
    background-color: transparent;
}

[data-bs-theme="dark"] .row {
    background-color: transparent;
}

[data-bs-theme="dark"] .col,
[data-bs-theme="dark"] [class*="col-"] {
    background-color: transparent;
}

[data-bs-theme="dark"] .table-responsive {
    background-color: transparent;
}

[data-bs-theme="dark"] .btn-group {
    background-color: transparent;
}

[data-bs-theme="dark"] .d-flex {
    background-color: transparent;
}

[data-bs-theme="dark"] .justify-content-between {
    background-color: transparent;
}

[data-bs-theme="dark"] .align-items-center {
    background-color: transparent;
}

[data-bs-theme="dark"] .text-bg-light {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .border {
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .border-0 {
    border-color: transparent !important;
}

[data-bs-theme="dark"] .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .card.shadow-sm {
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .card.shadow-sm.border-0 {
    border-color: transparent;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: #334155;
    --bs-table-hover-bg: rgba(30, 41, 59, 0.5);
    --bs-table-hover-color: #e2e8f0;
    --bs-table-striped-bg: rgba(15, 23, 42, 0.5);
    --bs-table-striped-color: #e2e8f0;
    --bs-table-active-bg: rgba(30, 41, 59, 0.8);
    --bs-table-active-color: #e2e8f0;
}

[data-bs-theme="dark"] .table-sm {
    --bs-table-bg: transparent;
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: #334155;
}

[data-bs-theme="dark"] .table-hover {
    --bs-table-hover-bg: rgba(30, 41, 59, 0.5);
    --bs-table-hover-color: #e2e8f0;
}

[data-bs-theme="dark"] .table-striped {
    --bs-table-striped-bg: rgba(15, 23, 42, 0.5);
    --bs-table-striped-color: #e2e8f0;
}

[data-bs-theme="dark"] .table-bordered {
    --bs-table-border-color: #334155;
}

[data-bs-theme="dark"] .table-responsive {
    background-color: transparent;
}

[data-bs-theme="dark"] .mb-0,
[data-bs-theme="dark"] .mb-1,
[data-bs-theme="dark"] .mb-2,
[data-bs-theme="dark"] .mb-3,
[data-bs-theme="dark"] .mb-4 {
    background-color: transparent;
}

.toast-container {
    z-index: 1080;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 260px;
    display: block;
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: #6c757d;
}

.chart-wrapper.chart-wrapper-empty canvas {
    display: none;
}

.chart-wrapper.chart-wrapper-empty .chart-empty {
    display: flex;
}

.payment-highlight-list .payment-highlight-item {
    border: 0;
    padding: 1rem 0;
    padding-left: 0;
    padding-right: 0;
    border-radius: 0.85rem;
    background-color: transparent;
}

.payment-highlight-list .payment-highlight-item + .payment-highlight-item {
    border-top: 1px solid #f1f3f5;
}

.payment-highlight-list .payment-highlight-item strong {
    font-size: 1rem;
}

[data-bs-theme="dark"] .payment-highlight-list .payment-highlight-item + .payment-highlight-item {
    border-top-color: #334155;
}

.payment-highlight-item--pending {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 159, 64, 0.1));
    box-shadow: inset 0 0 0 1px rgba(255, 193, 7, 0.25);
}

.payment-highlight-item--paid {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(22, 163, 74, 0.08));
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}

[data-bs-theme="dark"] .payment-highlight-item--pending {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.3);
}

[data-bs-theme="dark"] .payment-highlight-item--paid {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.15));
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.payment-highlight-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.payment-highlight-actions .btn {
    border-radius: 999px;
    padding-inline: 1rem;
}

.apartment-card {
    border: none;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0.25rem 1rem rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="dark"] .apartment-card {
    background: #1e293b;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .apartment-card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
}

.apartment-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--apartment-accent, rgba(148, 163, 184, 0.3));
    pointer-events: none;
}

.apartment-card--idle {
    --apartment-accent: rgba(220, 53, 69, 0.4);
}

.apartment-card--steady {
    --apartment-accent: rgba(253, 126, 20, 0.4);
}

.apartment-card--busy {
    --apartment-accent: rgba(13, 110, 253, 0.45);
}

.apartment-card--packed {
    --apartment-accent: rgba(25, 135, 84, 0.45);
}

.apartment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.12);
}

/* Cards de listagem de apartamentos */
.apartment-list-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

.apartment-list-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .apartment-list-card {
    border-color: #334155;
}

[data-bs-theme="dark"] .apartment-list-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
}

.apartment-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.apartment-info-grid .info-item {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border-left: 3px solid #0d6efd;
}

[data-bs-theme="dark"] .apartment-info-grid .info-item {
    background-color: #0f172a;
    border-left-color: #3b82f6;
}

@media (max-width: 575.98px) {
    .apartment-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.occupancy-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.occupancy-tag.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

.occupancy-tag.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.18);
    color: #997404;
}

.occupancy-tag.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.18);
    color: #0c5460;
}

.occupancy-tag.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.18);
    color: #0f5132;
}

[data-bs-theme="dark"] .occupancy-tag.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

[data-bs-theme="dark"] .occupancy-tag.bg-warning-subtle {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fde047;
}

[data-bs-theme="dark"] .occupancy-tag.bg-info-subtle {
    background-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

[data-bs-theme="dark"] .occupancy-tag.bg-success-subtle {
    background-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.chart-fallback {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 0.875rem;
    color: #495057;
}

.chart-fallback-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.chart-fallback-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    line-height: 1.3;
}

.chart-fallback-item__label {
    font-weight: 600;
    color: #343a40;
}

.chart-fallback-item__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.chart-fallback-item__metric {
    font-weight: 500;
}

.chart-fallback-item__metric--income {
    color: #198754;
}

.chart-fallback-item__metric--expense {
    color: #dc3545;
}

.chart-fallback-item__metric--net {
    font-weight: 600;
}

.chart-fallback-item__metric--net-positive {
    color: #0f5132;
}

.chart-fallback-item__metric--net-negative {
    color: #842029;
}

[data-bs-theme="dark"] .chart-fallback {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .chart-fallback-item__label {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .chart-fallback-item__metric--income {
    color: #4ade80;
}

[data-bs-theme="dark"] .chart-fallback-item__metric--expense {
    color: #f87171;
}

[data-bs-theme="dark"] .chart-fallback-item__metric--net-positive {
    color: #86efac;
}

[data-bs-theme="dark"] .chart-fallback-item__metric--net-negative {
    color: #fca5a5;
}

[data-bs-theme="dark"] .chart-fallback-item strong {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .chart-empty {
    color: #94a3b8;
}

.inventory-list .inventory-item {
    border-radius: 0.75rem;
}

.inventory-list .inventory-item .card-body {
    padding: 1rem 1.25rem;
}

/* Cookie Consent Banner */
.cookie-consent {
    animation: slideUp 0.5s ease-out;
    border-top: 3px solid #0d6efd;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-consent .btn {
    white-space: nowrap;
}

@media (max-width: 767px) {
    .cookie-consent .btn {
        font-size: 0.875rem;
    }
}

/* Botão flutuante para nova reserva (sempre visível como fallback) */
.floating-reservation-btn {
    position: fixed;
    right: 1rem;
    bottom: 1.25rem;
    z-index: 2050; /* acima de modais/backdrops */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    font-size: 1.05rem;
}

/* Versão menor em telas pequenas para não cobrir controles */
@media (max-width: 576px) {
    .floating-reservation-btn { right: 0.75rem; bottom: 0.9rem; width: 48px; height: 48px; }
}
