:root {
    /* Ana Renk Paleti*/
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --bg-dark: #0f172a;
    --sidebar-bg: rgba(30, 41, 59, 0.7);
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Oda Durum Renkleri */
    --room-clean: #10b981;
    --room-occupied: #f43f5e;
    --room-dirty: #64748b;
    --room-out: #f59e0b;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    margin: 0;
}

/* Cam Efektli Kaydırma Çubuğu */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Uygulama Ana Yerleşimi */
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
    backdrop-filter: blur(20px);
}

/* Yan Menü (Sidebar) Ayarları */
.sidebar {
    width: 230px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex; flex-direction: column;
    padding: 1.25rem;
    z-index: 100;
    flex-shrink: 0;
    overflow-y: auto;
}

.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.5rem; font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Üst Bar (Topbar) Ayarları */
.topbar {
    height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.search-box {
    display: flex; align-items: center; gap: 10px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 6px 12px; border-radius: 10px;
    width: 320px;
}

.search-box input {
    background: transparent; border: none; color: white; outline: none; flex: 1; font-size: 0.9rem;
}

.topbar-actions {
    display: flex; align-items: center; gap: 20px;
}

.action-icon {
    position: relative; cursor: pointer; color: var(--text-dim); transition: var(--transition);
}

.action-icon:hover { color: white; }
.notification-dot {
    position: absolute; top: -2px; right: -2px;
    width: 8px; height: 8px; background: var(--danger); border-radius: 50%;
}

.nav-menu {
    list-style: none; display: flex; flex-direction: column; gap: 4px;
}

.nav-item {
    padding: 10px 14px; border-radius: 10px;
    cursor: pointer; display: flex; align-items: center; gap: 12px;
    color: var(--text-dim); transition: var(--transition);
    font-weight: 500; font-size: 0.9rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.menu-category {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.5rem 0 0.5rem 0.6rem;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.night-audit-btn {
    color: var(--warning) !important;
}

.support-btn {
    opacity: 0.8;
    color: var(--accent) !important;
}

.nav-item i {
    width: 20px;
    font-size: 1.1rem;
}

/* Ana İçerik Alanı */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    position: relative;
}

/* Sayfa Başlığı ve Profil Kısmı */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-title h1 {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.view-title p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: white;
}

/* İstatistik Kartları (Dashboard) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.stat-card.revenue .stat-icon { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.stat-card.pos .stat-icon { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.stat-card.occupancy .stat-icon { background: rgba(139, 92, 246, 0.1); color: var(--accent); }
.stat-card.stock .stat-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.stat-value { font-size: 1.6rem; font-weight: 700; margin: 4px 0; }
.stat-label { color: var(--text-dim); font-size: 0.85rem; }

/* Genel Kart ve Tablo Yapıları */
.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    overflow: hidden;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--glass-border);
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
}

tr:last-child td { border-bottom: none; }

.badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge.success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.badge.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Oda Rack Izgarası */
.floor-section {
    margin-bottom: 2rem;
}

.floor-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.room-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.room-card:hover {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.3);
}

.room-card.occupied { border-left: 4px solid var(--room-occupied); }
.room-card.clean { border-left: 4px solid var(--room-clean); }
.room-card.dirty { border-left: 4px solid var(--room-dirty); }
.room-card.maintenance { border-left: 4px solid var(--room-out); }

.room-number { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.room-type { font-size: 0.75rem; color: var(--text-dim); }

/* Modal (Açılır Pencere) Stilleri */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    width: 500px;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Buton Tasarımları */
.btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline { background: transparent; border: 1px solid var(--glass-border); color: white; }
.btn-outline:hover { background: rgba(255,255,255,0.05); }

/* POS (Satış Noktası) Yerleşimi */
.pos-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.menu-item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
}

.menu-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.menu-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #2d3748;
}

/* Kritik Stok Uyarıları */
.stock-critical {
    color: var(--danger);
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* --- MOBİL VE TABLET UYUMLULUĞU (RESPONSIVE) --- */

/* Tablet ve Altı (1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
        padding: 1rem 0.5rem;
    }
    .logo span, .nav-item span, .menu-category {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    .nav-item i {
        margin: 0;
        font-size: 1.2rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .search-box {
        width: 160px;
    }
}

/* Mobil (768px ve Altı) */
@media (max-width: 768px) {
    body { overflow: auto; }
    
    .mobile-menu-btn {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%; /* Gizle */
        height: 100vh;
        width: 250px;
        transition: var(--transition);
        z-index: 2000;
        background: var(--bg-dark); /* Mobilde tam opak yap */
    }

    .sidebar.active {
        left: 0; /* Göster */
    }

    /* Sidebar açıkken arkada karartma */
    .sidebar-overlay {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        display: none;
        z-index: 1999;
    }

    .sidebar.active + .sidebar-overlay {
        display: block;
    }

    .logo span, .nav-item span, .menu-category {
        display: block; /* Hamburger açılınca metinler görünsün */
    }
    
    .nav-item {
        justify-content: flex-start;
    }

    .topbar {
        padding: 0 1rem;
    }

    .search-box, .user-info {
        display: none;
    }

    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .pos-grid {
        grid-template-columns: 1fr;
    }

    .card, .stat-card {
        padding: 1rem;
    }

    .modal {
        width: 95%;
        margin: 2.5%;
        padding: 1.5rem;
    }
}
