/* static/css/custom.css - TEMA POUSADA POR DO SOL 🌅 */

:root {
    --color-primary: #ef233c;
    /* Red Sunset */
    --color-secondary: #2b2d42;
    /* Twilight Indigo */
    --color-accent: #ffb703;
    /* Golden Sun */
    --color-bg: #fffbf0;
    /* Soft Sand */
    --color-text: #2b2d42;

    /* Status Colors */
    --status-livre-bg: #e9ecef;
    --status-livre-text: #495057;

    --status-reservado-bg: #ffca3a;
    /* Amber */
    --status-reservado-text: #5c3d00;

    --status-ocupado-bg: #4361ee;
    /* Indigo Night (Hospedado) */
    --status-ocupado-text: #ffffff;

    --status-pago-bg: #8ac926;
    /* Sea Green */
    --status-pago-text: #ffffff;

    --status-divida-bg: #ef233c;
    /* Red Alert */
    --status-divida-text: #ffffff;

    --status-manu-bg: #6c757d;
    --status-manu-text: #ffffff;

    --font-main: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
}

.bg-sunset-light {
    background-color: var(--color-bg);
}

/* NAVBAR CUSTOMIZATION */
.navbar {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    border-bottom: none !important;
}

.navbar-brand img {
    border: 3px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
}

/* CARDS & CONTAINERS */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(43, 45, 66, 0.05);
    background-color: #ffffff;
}

/* TABLE STYLES */
.table {
    --bs-table-bg: transparent;
}

.table thead th {
    background-color: #f8f9fa;
    color: var(--color-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

/* MAPA DE QUARTOS */
.room-row {
    height: 90px;
}

.day-cell {
    border-right: 1px dashed rgba(0, 0, 0, 0.05);
    position: relative;
}

/* RESERVA BARS */
.reserva-bar {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 2px;
    right: 2px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

/* CORES DOS STATUS */
.status-livre {
    background-color: var(--status-livre-bg);
    color: var(--status-livre-text);
    border: 1px dashed #ced4da;
}

.status-reservado {
    background: linear-gradient(to right, #ffca3a, #ff9f1c);
    color: var(--status-reservado-text);
}

.status-ocupado {
    background: linear-gradient(to right, #4361ee, #3f37c9);
    color: var(--status-ocupado-text);
}

.status-pago {
    background: linear-gradient(to right, #8ac926, #1982c4);
    color: var(--status-pago-text);
}

.status-divida {
    background: linear-gradient(to right, #ef233c, #d90429);
    color: var(--status-divida-text);
}

.status-manutencao {
    background-color: var(--status-manu-bg);
    color: var(--status-manu-text);
    opacity: 0.8;
}

/* BADGES MODERNAS */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: 6px;
}

/* BUTTONS */
.btn-primary {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn-success {
    background-color: var(--status-pago-bg);
    border: none;
}

.btn-warning {
    background-color: var(--color-accent);
    color: #ae4809;
    border: none;
}

.btn-danger {
    background-color: var(--color-primary);
    border: none;
}

/* ==========================================
   MOBILE-ONLY OVERRIDES (UP TO 991px)
   ========================================== */
@media (max-width: 991px) {
    .navbar {
        min-height: 70px !important;
    }

    /* Logo moves to the left on mobile ONLY if not absolute */
    .navbar:not(.position-relative) .navbar-brand {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        margin-right: auto;
    }

    /* Se a navbar tiver position-relative, tentamos forçar a logo a não ocupar o meio se o menu abrir */
    .navbar-toggler:not(.collapsed)~.navbar-brand {
        opacity: 0.1;
        /* Esconde sutilmente se menu aberto */
    }

    .navbar-brand img {
        height: 50px !important;
    }

    /* Cards de Quarto (Mobile View) */
    .room-card-mobile {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.08);
        background: #fff;
        margin-bottom: 0.8rem;
    }

    .status-indicator-strip {
        width: 10px;
        height: 100%;
        flex-shrink: 0;
    }
}

/* ==========================================
   LÓGICA DE ORIENTAÇÃO AGRESSIVA (WIDTH > HEIGHT)
   ========================================== */
@media (min-aspect-ratio: 1/1) and (max-width: 1199px) {
    .hide-landscape {
        display: none !important;
    }

    .show-landscape {
        display: block !important;
    }

    .d-lg-none.hide-landscape {
        display: none !important;
    }

    .d-none.d-lg-block.show-landscape {
        display: block !important;
    }

    /* Ajuste de Navbar Landscape no Mobile */
    .navbar {
        min-height: 60px !important;
        padding: 0 !important;
    }

    .navbar-brand {
        display: none !important;
    }
}

/* Utilitários Gerais */
.border-dashed {
    border: 2px dashed #dee2e6 !important;
}

.btn-group .btn {
    display: flex;
    align-items: center;
    justify-content: center;
}