/* ============================================================
   1. ОБЩИЕ ПРАВИЛА
   ============================================================ */
:root {
    --primary-blue: #33c3db;
}

/* Растягиваем контент на всю ширину для мобильной версии */
.site-grid, .container-component, #adminForm, .table-responsive, #solidres { 
    width: 100% !important; 
    max-width: 100% !important; 
}

/* ============================================================
   2. КАРТОЧКИ (Активируются через класс view- в index.php)
   ============================================================ */
@media (max-width: 768px) {
    /* Скрываем шапку таблицы для всех рабочих представлений */
    body.view-reservations thead, 
    body.view-invoices thead, 
    body.view-housekeeping thead,
    body.view-calendars thead { 
        display: none !important; 
    }
    
    /* Превращаем строки таблицы в аккуратные карточки */
    body.view-reservations tr, 
    body.view-invoices tr, 
    body.view-housekeeping tr {
        display: block !important;
        margin-bottom: 15px !important;
        padding: 12px !important;
        background: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
        border: 1px solid #eee !important;
        position: relative;
    }

    /* Форматируем ячейки внутри карточки */
    body.view-reservations td, 
    body.view-invoices td, 
    body.view-housekeeping td {
        display: block !important;
        width: 100% !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid #f8f8f8 !important;
        text-align: left !important;
        font-size: 14px !important;
    }

    /* Убираем лишнюю рамку у последней строки в карточке */
    td:last-child { border-bottom: none !important; }
    td::before { content: none !important; }

    /* СВЕТОФОР (Тонкая статусная полоска слева в карточке Уборки) */
    .room_status_0 { border-left: 5px solid #28a745 !important; } /* Чисто */
    .room_status_1 { border-left: 5px solid #ffc107 !important; } /* Осмотрено */
    .room_status_2 { border-left: 5px solid #dc3545 !important; } /* Грязно */
}

/* ============================================================
   3. НИЖНЯЯ НАВИГАЦИЯ (Системная)
   ============================================================ */
@media (max-width: 991px) {
    body { padding-bottom: 85px !important; }

    .mobile-bottom-nav {
        position: fixed !important;
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        height: 65px !important;
        background: #ffffff !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        border-radius: 18px !important;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
        z-index: 10001 !important;
        border: 1px solid #eee !important;
    }

    .nav-item-mobile {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-decoration: none !important;
        color: #555 !important;
        transition: color 0.3s ease;
    }

    .nav-item-mobile i { 
        font-size: 20px !important; 
        margin-bottom: 3px !important; 
        color: #333 !important; 
    }

    .nav-item-mobile span { 
        font-size: 8px !important; 
        font-weight: 700 !important; 
        text-transform: uppercase !important; 
    }
    
    /* Подсветка при нажатии */
    .nav-item-mobile:active i, 
    .nav-item-mobile:active span { 
        color: var(--primary-blue) !important; 
    }
}

/* ПРИМЕЧАНИЕ: Стили старого языкового меню (lang-toggle) удалены, 
   так как выбор языка теперь осуществляется через профиль пользователя. */