/* === CRMPLUS HOTEL ULTRA COMPACT STYLE v5.1 === */
body { background: #f0f2f5; font-family: 'Inter', system-ui, sans-serif; color: #344767; font-size: 0.88rem; }

/* NAVBAR */
.navbar { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.03); padding: 0.6rem 1rem; }
.form-control, .form-select { font-size: 0.85rem; padding: 0.5rem 0.8rem; border-color: #e9ecef; }
.form-control:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.15); }

/* AUTH INPUT & LOGIN CARD FIX */
#loginOverlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #e2e8f0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.login-card {
    background: #fff; padding: 2.5rem; border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%; max-width: 400px;
}

.tab-pane {height: 70vh;}

/* ODA KARTI (ROOM CARD) */
.room-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    position: relative;
    border: 1px solid #eef1f6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.015);
    transition: all 0.2s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}
.room-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); border-color: #dbeafe; z-index: 10; }

/* SİLİK NUMARA (WATERMARK) */
.room-card::before {
    content: attr(data-roomno);
    position: absolute;
    top: -10px; right: -5px;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(0,0,0,0.03);
    pointer-events: none;
    line-height: 1;
}

/* KART BAŞLIK */
.room-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; position: relative; z-index: 2; }
.room-number { font-size: 1.1rem; font-weight: 800; color: #1e293b; }
.room-type { font-size: 0.7rem; color: #64748b; font-weight: 600; text-transform: uppercase; }

/* DROPDOWN STATUS BADGE */
.status-dropdown .btn {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 4px;
    border: 0; 
}
.status-dropdown .dropdown-menu { font-size: 0.8rem; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border:none; min-width: 140px; }
.status-dropdown .dropdown-item { padding: 6px 12px; font-weight: 500; }
.status-dropdown .dropdown-item i { width: 16px; text-align: center; margin-right: 6px; }

/* RENKLER */
.st-empty { background: #dcfce7; color: #166534; }
.st-occupied { background: #fee2e2; color: #991b1b; }
.st-clean { background: #fef9c3; color: #854d0e; }
.st-maintenance { background: #f1f5f9; color: #475569; }

/* ÖZELLİKLER */
.room-features { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.feat-icon { 
    width: 22px; height: 22px; 
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; 
    display: flex; align-items: center; justify-content: center; 
    color: #94a3b8; font-size: 0.7rem; 
}

/* MÜŞTERİ KUTUSU */
.guest-info-box {
    margin-top: auto;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px dashed #e2e8f0;
    text-align: center;
    min-height: 42px;
    display: flex; flex-direction: column; justify-content: center;
}
.guest-info-box.has-guest { background: #eff6ff; border: 1px solid #bfdbfe; border-style: solid; cursor: pointer; transition: all 0.2s; }
.guest-info-box.has-guest:hover { background: #dbeafe; transform: scale(1.02); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.guest-info-box.has-guest::after {
    content: '\f044'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; top: 2px; right: 4px; font-size: 8px; color: #93c5fd; opacity: 0.5;
}
.guest-name { font-weight: 700; color: #1e40af; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-dates { font-size: 0.65rem; color: #60a5fa; margin-top: 1px; }

/* BUTONLAR */
.card-actions { display: flex; gap: 6px; z-index: 2; }
.btn-action { padding: 6px; font-size: 0.8rem; border-radius: 6px; border: 1px solid #e2e8f0; background: #fff; color: #64748b; }
.btn-action:hover { background: #f8fafc; border-color: #cbd5e0; color: #334155; }
.btn-reserve { background: #3b82f6; color: white; border: none; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.3px; }
.btn-reserve:hover { background: #2563eb; color: white; }

/* PRELOADER FIX */
#appPreloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #ffffff; z-index: 10000;
    display: flex; /* Flex ile ortalamayı garantiledik */
    flex-direction: column; align-items: center; justify-content: center;
}

/* === TAKVİM GÜNCELLEMESİ === */
.calendar-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    gap: 4px; /* Günler arası boşluk */
    text-align: center; 
    margin-bottom: 1rem; 
}

/* Gün Kutusu Temel Tasarım */
.cal-day { 
    aspect-ratio: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 8px; 
    font-size: 0.9rem; 
    background: #f8fafc; 
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #64748b;
}

.cal-day:hover { background: #e2e8f0; }

/* Dolu Gün (Kırmızı) */
.cal-day.occupied { 
    background-color: #fee2e2; 
    color: #991b1b; 
    border-color: #fecaca;
    font-weight: 700;
}

/* Seçili Gün (Mavi - En baskın renk) */
.cal-day.selected-day {
    background-color: #3b82f6 !important; /* Önemli: Dolu rengini ezmeli */
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
    z-index: 5;
}

/* Boşluklar (Ay başı boş günleri) */
.cal-day.empty { 
    background: transparent; 
    border: none; 
    cursor: default; 
}

/* Haftanın Günleri Başlığı */
.cal-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    padding-bottom: 5px;
}

/* === MOBİL ALT NAVİGASYON (APP GÖRÜNÜMÜ) === */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #eef1f6;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 8px 0; /* iOS safe area için alt boşluk payı */
    z-index: 1030; /* Modalların (1050) altında kalsın */
    box-shadow: 0 -5px 25px rgba(0,0,0,0.05);
    display: none; /* Masaüstünde gizli */
}

/* Sadece Mobilde Görünür Yap */
@media (max-width: 991.98px) {
    .mobile-bottom-nav { display: flex; }
    body { padding-bottom: 90px; } /* İçerik menü altında kalmasın */
    
    /* Mobilde üstteki arama kutusunu küçült */
    #quickSearch { width: 100% !important; }
    
    /* Mobilde üst barı biraz sadeleştir */
    .navbar { padding: 0.5rem; }
}

/* Alt Menü Butonları */
.mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 700;
    width: 100%;
    background: transparent;
    border: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.mob-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
    color: #cbd5e1;
    transition: all 0.2s;
}

/* Aktif / Tıklama Efekti */
.mob-nav-item:hover, .mob-nav-item:active, .mob-nav-item:focus {
    color: #3b82f6;
    outline: none;
}
.mob-nav-item:hover i, .mob-nav-item:active i, .mob-nav-item:focus i {
    color: #3b82f6;
    transform: translateY(-3px);
}
/* === AYARLAR MODALI MOBİL DÜZENLEMESİ (Responsive Settings) === */

/* 992px altındaki ekranlarda (Tablet ve Mobil) devreye girer */
@media (max-width: 991.98px) {
    
    /* 1. Modalı Tam Ekran Yap */
    #modalSettings .modal-dialog {
        max-width: 100%;
        margin: 0;
        height: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
    }
    
    #modalSettings .modal-content {
        height: 100%;
        border-radius: 0; /* Köşeleri düzelt */
        border: none;
    }

    /* 2. Yan Yana (Row) Yapısını Alt Alta (Column) Çevir */
    #modalSettings .modal-body {
        flex-direction: column !important; /* Dikey dizilim */
        display: flex;
    }

    /* 3. Sol Menüyü (Sidebar) Üst Menüye Dönüştür */
    #modalSettings .modal-body > div:first-child {
        width: 100% !important; /* Genişliği fulle */
        min-width: 100% !important; /* Inline stili ezmek için !important */
        border-right: none !important;
        border-bottom: 1px solid #e9ecef;
        padding: 10px !important;
        background-color: #fff !important;
        flex-shrink: 0; /* Küçülmesini engelle */
        overflow-x: auto; /* Yanlamasına kaydırma */
    }

    /* 4. Menü Butonlarını Yatay Diz */
    #modalSettings .nav-pills {
        flex-direction: row !important; /* Butonlar yan yana */
        flex-wrap: nowrap; /* Alt satıra düşmesin */
        gap: 8px;
        padding-bottom: 5px;
    }

    #modalSettings .nav-link {
        white-space: nowrap; /* Yazılar kırılmasın */
        padding: 8px 16px;
        font-size: 0.85rem;
        border: 1px solid #e9ecef;
        background: #f8f9fa;
        text-align: center;
        margin-bottom: 0 !important;
        border-radius: 20px; /* Hap şeklinde butonlar */
    }

    #modalSettings .nav-link.active {
        background-color: #3b82f6;
        border-color: #3b82f6;
        color: white;
        box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    }

    /* 5. Sağ İçerik Alanını Genişlet */
    #modalSettings .modal-body > div:last-child {
        width: 100% !important;
        padding: 15px !important;
        overflow-y: auto; /* Kendi içinde kaydırma */
        flex-grow: 1; /* Kalan boşluğu doldur */
        padding-bottom: 80px !important; /* Alt menü payı */
    }

    /* 6. Form Elemanlarını Mobilde Güzelleştir */
    #modalSettings form .row > div {
        margin-bottom: 10px;
    }
    
    /* Tablolar taşarsa kaydırma çubuğu ekle */
    #modalSettings .table-responsive {
        border: 1px solid #eee;
        border-radius: 8px;
    }
}
/* === MOBİL TAM EKRAN MODAL DÜZENLEMESİ === */
@media (max-width: 991.98px) {
    /* Tüm modalları hedef al */
    .modal {
        padding: 0 !important;
    }

    .modal-dialog {
        max-width: 100%;
        width: 100%;
        margin: 0;
        height: 100%;
    }

    .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    /* Modal Başlığı - Sabit kalsın */
    .modal-header {
        flex-shrink: 0;
        border-bottom: 1px solid #eee !important;
        padding: 15px !important;
    }

    /* Modal Gövdesi - Kaydırılabilir (Scroll) alan */
    .modal-body {
        flex-grow: 1;
        overflow-y: auto; /* İçerik taşarsa kendi içinde kaysın */
        -webkit-overflow-scrolling: touch; /* iOS pürüzsüz kaydırma */
        padding: 15px !important;
        padding-bottom: 30px !important; /* Alt kısımda biraz boşluk */
    }

    /* Modal Footer veya Buton Alanları - Sabit kalması için */
    .modal-footer {
        flex-shrink: 0;
        background: #fff;
        border-top: 1px solid #eee;
        padding: 10px 15px !important;
    }

    /* Ayarlar Modalı Özel Düzenleme (Zaten yapmıştık ama çakışmasın) */
    #modalSettings .modal-body {
        display: flex;
        flex-direction: column;
        padding: 0 !important;
    }

    /* Takvim Modalı Mobilde Grid Ayarı */
    #modalRoomCalendar .calendar-grid {
        gap: 2px;
    }
    #modalRoomCalendar .cal-day {
        font-size: 0.8rem;
    }
    
    /* Mobil alt navigasyonun modal açıkken üstte kalmaması için (opsiyonel) */
    body.modal-open .mobile-bottom-nav {
        display: none !important;
    }
}
@keyframes pulse-warning {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.animate-pulse {
    animation: pulse-warning 2s infinite;
}
/* Mobilde Select Ok Simgesi Çakışmasını Engelle */
@media (max-width: 768px) {
    .table-transfer select.form-select {
        appearance: none; /* Varsayılan oku kaldır */
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: none !important; /* Bootstrap okunu kaldır */
        padding-right: 0 !important;
        text-align: center; /* Metni ortala ki ok olmadığı belli olsun */
        width: auto;
        display: inline-block;
    }
}

/* Alternatif: Okun yerini korumak ama yazıyı kurtarmak istersen */
.form-select-sm.border-0 {
    padding-right: 1.5rem !important; /* Yazı ile ok arasına boşluk açar */
    background-position: right center !important; /* Oku en sağa yaslar */
}