/* GENEL YAPILANDIRMA */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    /* HAKİM RENK: KIRMIZI YAPILDI */
    --ana-renk: #1263d6; 
    
    /* BUTON VE BAŞARI RENGİ: YEŞİL */
    --yesil: #10B981; 
    --buton-renk: #059669; /* Butonlar için biraz daha koyu yeşil */
    
    --koyu-renk: #282B30; /* Sidebar */
    --gri-zemin: #F4F5F7;
    --beyaz: #FFFFFF;
    --cizgi-rengi: rgba(0, 0, 0, 0.2); 
    --mavi: #3B82F6; /* Bilgi / Seçili (Önceki renklerde kalabilir, yardımcı renktir) */
}

body {
    background-color: var(--gri-zemin);
    font-family: 'Poppins', sans-serif;
    margin: 0; padding: 0; display: flex; min-height: calc(var(--codex-vh, 1vh) * 100);
    padding-bottom: 70px; color: #1F2937;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; padding: 0; margin: 0; }
* { box-sizing: border-box; }

/* --- MASAÜSTÜ SIDEBAR --- */
.sidebar {
    width: 270px; background-color: var(--koyu-renk); color: #9CA3AF;
    display: flex; flex-direction: column; position: fixed; height: 100%;
    left: 0; top: 0; z-index: 100; box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar-header {
    height: 64px; display: flex; align-items: center; padding-left: 24px;
    background-color: rgba(0,0,0,0.2); border-bottom: 1px solid var(--cizgi-rengi); 
}
.sidebar-header h3 { color: var(--ana-renk); margin: 0; font-size: 20px; font-weight: 600; }

.menu { flex: 1; overflow-y: auto; padding: 0; }

.menu-item { margin-bottom: 0; border-bottom: 1px solid var(--cizgi-rengi); border-left: 4px solid transparent; }
.menu-item.acik, .menu-item.aktif-blok { background-color: rgba(255,255,255,0.03); border-left-color: var(--ana-renk); }

.menu-link {
    display: flex; align-items: center; padding: 16px 24px; color: #C0C5CE; 
    font-size: 15px; font-weight: 500; text-transform: uppercase; 
    letter-spacing: 0.5px; transition: all 0.2s ease;
}
.menu-link:hover { color: var(--beyaz); background-color: rgba(255,255,255,0.05); }
.menu-link.aktif { color: var(--beyaz); font-weight: 600; }
.menu-link i { width: 30px; font-size: 18px; color: #9CA3AF; margin-right: 10px; }
.menu-link:hover i, .menu-link.aktif i { color: var(--ana-renk); }
.menu-link .fa-caret-down { margin-left: auto; font-size: 14px; opacity: 0.8; transition: transform 0.3s; }
.menu-item.acik .menu-link .fa-caret-down { transform: rotate(180deg); color: var(--beyaz); }

.alt-menu { display: none; padding: 5px 0 15px 0; background-color: rgba(0,0,0,0.2); }
.menu-item.acik .alt-menu { display: block; }
.alt-menu a {
    padding: 12px 24px 12px 64px; display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: #9CA3AF; font-weight: 400; position: relative; transition: 0.2s;
}
.alt-menu a:hover { color: var(--beyaz); padding-left: 68px; }
.alt-menu a.aktif-alt { color: var(--beyaz); font-weight: 500; }
.alt-menu a.aktif-alt::before {
    content: ''; position: absolute; left: 48px; width: 6px; height: 6px;
    border-radius: 50%; background-color: var(--ana-renk);
}

/* --- SAĞ İÇERİK --- */
.main-content { flex: 1; margin-left: 270px; display: flex; flex-direction: column; width: calc(100% - 270px); }
.topbar { height: 64px; background-color: var(--beyaz); border-bottom: 1px solid #E5E7EB; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; }
.sayfa-baslik { font-size: 20px; font-weight: 600; color: #111827; }
.kullanici-menu { display: flex; align-items: center; gap: 8px; }
.profil-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: #374151; padding: 6px 10px; border-radius: 6px; transition: background 0.2s; }
.profil-btn:hover { background-color: #F3F4F6; color: var(--ana-renk); }
.cikis-btn { color: var(--ana-renk); font-size: 20px; padding: 5px; transition: 0.2s; display: flex; align-items: center; }
.cikis-btn:hover { transform: scale(1.1); color: #8a1014; } /* Hoverda daha koyu kırmızı */
.icerik-kapsayici { padding: 30px; }

/* Dashboard Grid */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 30px; }
.dash-kart { background: var(--beyaz); border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid #E5E7EB; }
.dash-baslik { font-size: 13px; color: #6B7280; font-weight: 600; margin-bottom: 8px; }
.dash-deger { font-size: 28px; font-weight: 600; color: #111827; letter-spacing: -0.5px; }
.tablo-kutu { background: var(--beyaz); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); overflow: hidden; margin-bottom: 30px; border: 1px solid #E5E7EB; }
.tablo-header { padding: 20px 24px; border-bottom: 1px solid #F3F4F6; font-weight: 600; color: #111827; font-size: 16px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 24px; background: #F9FAFB; font-size: 12px; color: #6B7280; font-weight: 600; text-transform: uppercase; border-bottom: 1px solid #E5E7EB; }
td { padding: 16px 24px; border-bottom: 1px solid #F3F4F6; font-size: 14px; color: #374151; }
tr:last-child td { border-bottom: none; }

/* --- MOBİL MENÜ ÖZEL STİLLERİ --- */
.mobil-bottom-bar { display: none; }

.mobil-menu-grid { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 15px; 
}
.mobil-menu-item { 
    background: var(--beyaz); border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.04); 
    color: #374151; border: 1px solid #F3F4F6; overflow: visible; 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 25px 10px; cursor: pointer; transition: 0.2s; position: relative;
}
.mobil-menu-item i.ana-ikon { font-size: 32px; color: var(--ana-renk); margin-bottom: 10px; }
.mobil-menu-item span { font-size: 14px; font-weight: 600; text-transform: uppercase; text-align: center; }

.mobil-menu-item.aktif-kart { border-color: var(--ana-renk); background-color: #fce8e9; } /* Açık Kırmızı Arkaplan */
.mobil-menu-item.aktif-kart::after {
    content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
    border-left: 8px solid transparent; border-right: 8px solid transparent;
    border-top: 8px solid var(--ana-renk); z-index: 10;
}
.mobil-detay-row {
    grid-column: 1 / -1; background: #FFFFFF; border: 1px solid var(--ana-renk);
    border-radius: 12px; padding: 5px 0; margin-top: -10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); z-index: 5;
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Alt linklerin sola hizalanması ve aralıkları */
.mobil-alt-link {
    display: flex; padding: 14px 20px; text-align: left; font-size: 14px; color: #6B7280; font-weight: 500;
    border-bottom: 1px solid #F3F4F6; align-items: center; gap: 12px; justify-content: flex-start;
}
.mobil-alt-link:last-child { border-bottom: none; }
.mobil-alt-link:hover { color: var(--ana-renk); background-color: #FAFAFA; }
.mobil-alt-link i { font-size: 10px; color: var(--ana-renk); width: 14px; text-align: center; }

/* --- FAB (YAY MENÜ) STİLLERİ --- */
.fab-wrapper {
    position: relative;
    width: 60px; height: 60px;
    margin-top: -30px; 
    display: flex; align-items: center; justify-content: center;
}

.fab-btn {
    width: 56px; height: 56px;
    background-color: var(--buton-renk); /* YEŞİL */
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 24px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    border: 4px solid var(--gri-zemin); 
    position: relative;
    z-index: 1002;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.fab-wrapper.active .fab-btn {
    transform: rotate(45deg);
    background-color: #047857; /* Daha koyu yeşil */
}

.fab-menu-items {
    position: absolute;
    bottom: 5px; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; 
    z-index: 1001;
}

.fab-item {
    position: absolute;
    width: 72px; height: 72px;
    background-color: white;
    color: var(--ana-renk); /* İkonlar hakim renk (kırmızı) */
    border-radius: 50%;
    display: flex; 
    flex-direction: column; 
    align-items: center; justify-content: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.15);
    font-size: 22px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    left: 50%; bottom: 10px;
    margin-left: -36px;
    text-decoration: none;
    pointer-events: auto;
    border: 1px solid #F3F4F6;
}

.fab-item span {
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    margin-top: 3px;
    color: #374151;
    text-transform: capitalize;
}

.fab-wrapper.active .item-1 { opacity: 1; transform: translate(-92px, -38px) scale(1); }
.fab-wrapper.active .item-2 { opacity: 1; transform: translate(-38px, -92px) scale(1); }
.fab-wrapper.active .item-3 { opacity: 1; transform: translate(38px, -92px) scale(1); }
.fab-wrapper.active .item-4 { opacity: 1; transform: translate(92px, -38px) scale(1); }


/* --- ETKİNLİK SİHİRBAZI & SAHNE TASARIMI --- */

/* 1. Sihirbaz Adımları (Wizard Steps) */
.wizard-steps {
    display: flex; justify-content: space-between; margin-bottom: 30px; position: relative;
}
.wizard-steps::before {
    content: ''; position: absolute; top: 15px; left: 0; width: 100%; height: 2px;
    background: #E5E7EB; z-index: 0;
}
.wizard-step {
    position: relative; z-index: 1; text-align: center; width: 33.33%;
}
.wizard-step .step-icon {
    width: 32px; height: 32px; background: #fff; border: 2px solid #E5E7EB;
    color: #9CA3AF; border-radius: 50%; margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center; font-weight: 600;
    transition: all 0.3s;
}
.wizard-step.active .step-icon {
    border-color: var(--ana-renk); background: var(--ana-renk); color: #fff;
    box-shadow: 0 0 0 4px rgba(18,99,214, 0.2); /* Kırmızı gölge yapıldı */
}
.wizard-step.completed .step-icon {
    border-color: var(--yesil); background: var(--yesil); color: #fff;
}
.wizard-step span {
    font-size: 13px; font-weight: 600; color: #9CA3AF; display: block;
}
.wizard-step.active span { color: #1F2937; }

/* 2. Sahne Tasarımı Alanı */
.design-container {
    display: grid; grid-template-columns: 250px 1fr; gap: 20px; height: calc((var(--codex-vh, 1vh) * 100) - 150px);
}
.design-sidebar {
    background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #E5E7EB;
    overflow-y: auto; display: flex; flex-direction: column; gap: 15px;
}
.design-canvas-wrapper {
    background: #fff; border-radius: 12px; border: 1px solid #E5E7EB;
    overflow: hidden; position: relative;
    background-image: radial-gradient(#E5E7EB 1px, transparent 1px);
    background-size: 20px 20px; /* Izgara görünümü */
}
.design-canvas {
    width: 100%; height: 100%; position: relative; cursor: grab;
}
.design-canvas:active { cursor: grabbing; }

/* Sürüklenebilir Koltuk */
.seat-item {
    width: 30px; height: 30px; background: #E5E7EB; border: 1px solid #9CA3AF;
    border-radius: 6px 6px 2px 2px; /* Koltuk şekli */
    position: absolute; display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: bold; color: #374151;
    cursor: pointer; user-select: none; box-shadow: 0 2px 2px rgba(0,0,0,0.1);
}
.seat-item.selected { border-color: var(--ana-renk); box-shadow: 0 0 0 2px var(--ana-renk); }
.seat-item:hover { transform: scale(1.1); z-index: 10; }

/* Mobil Uyumluluk */
@media (max-width: 768px), (max-width: 950px) and (max-height: 500px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; width: 100%; }
    .icerik-kapsayici {
        padding-top: 10px;
        padding-right: max(10px, env(safe-area-inset-right));
        padding-bottom: calc(86px + env(safe-area-inset-bottom));
        padding-left: max(10px, env(safe-area-inset-left));
        box-sizing: border-box; max-width: 100vw; overflow-x: hidden;
    }
    .topbar { padding: 0 15px; height: 60px; }
    .sayfa-baslik { font-size: 16px; }
    .profil-btn span { display: block; font-size:13px; }
    .profil-btn i { display: none; }
    .tablo-kutu {
        max-width: 100%;
        margin-bottom: 15px;
        border-radius: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
    }
    .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        display: block;
        padding-bottom: 4px;
    }
    .tablo-kutu table,
    .table-responsive table,
    .custom-table {
        width: max-content;
        min-width: 680px;
        max-width: none;
    }
    .tablo-kutu th,
    .tablo-kutu td,
    .custom-table th,
    .custom-table td {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .mobil-bottom-bar {
        display: flex; justify-content: space-around; align-items: center;
        position: fixed; bottom: 0; left: 0; width: 100%; height: 65px;
        background: var(--beyaz); border-top: 1px solid #E5E7EB; z-index: 999;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.03);
    }
    .nav-item { display: flex; flex-direction: column; align-items: center; color: #9CA3AF; font-size: 11px; gap: 4px; width: 60px; font-weight: 500; }
    .nav-item.aktif { color: var(--ana-renk); }
    .nav-item i { font-size: 20px; }
    
    /* Tasarım ekranı mobilde alt alta */
    .design-container { grid-template-columns: 1fr; height: auto; }
    .design-canvas-wrapper { height: 400px; }
}
/* Mobil Menü Açılır Satır Fix */
.mobil-detay-row {
    grid-column: 1 / span 2; /* İki kolonu da kapla */
    display: block !important; /* Her ihtimale karşı görünür yap */
    width: 100%;
    margin-top: -10px;
    margin-bottom: 15px;
    z-index: 9;
}
