:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --primary-color: #4338ca;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body { background: var(--bg-light); display: flex; overflow-x: hidden; min-height: 100vh; }

/* --- Sidebar Ana Konteynırı --- */
.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid var(--border-color);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Daralmış Sidebar Hali */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Header: Logo ve Buton */
.sidebar-header {
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sidebar.collapsed .logo-text {
    display: none;
}

/* Hamburger Butonu */
.toggle-btn {
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-btn:hover { background: #e2e8f0; }

.hamburger-icon {
    width: 18px;
    height: 2px;
    background: #64748b;
    position: relative;
}
.hamburger-icon::before, .hamburger-icon::after {
    content: '';
    width: 18px;
    height: 2px;
    background: #64748b;
    position: absolute;
    left: 0;
}
.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }

/* Menü Alanı */
.menu-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
}

/* Ortak Link ve Grup Stili */
.menu-link, .menu-group {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    width: 100%;
    border: none;
    background: none;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
}

/* --- OKLARI SAĞA YASLAYAN AYAR --- */
.menu-group {
    justify-content: space-between; 
}

.menu-link:hover, .menu-group:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.menu-link.active {
    background: #eef2ff;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

/* İkonlar */
.menu-icon {
    min-width: 24px;
    max-width: 24px;
    height: 24px;
    margin-right: 15px;
    object-fit: contain;
    transition: var(--transition);
    opacity: 0.8;
}

/* Sol Taraf: İkon ve Metin Grubu */
.menu-text-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- Sağ Taraf: Büyük Oklar (Chev) --- */
.chev {
    font-size: 16px; 
    color: #94a3b8;
    transition: transform 0.3s ease;
    margin-left: auto; /* Sağa yaslamayı garanti eder */
    display: inline-block;
}

/* Menü Açıldığında Okun Dönmesi */
.menu-group.open .chev {
    transform: rotate(180deg);
}

/* --- Daralmış Sidebar Durumu --- */
.sidebar.collapsed .menu-text, 
.sidebar.collapsed .chev {
    display: none !important;
}

.sidebar.collapsed .menu-icon {
    margin-right: 0;
}

.sidebar.collapsed .menu-link, 
.sidebar.collapsed .menu-group {
    justify-content: center;
    padding: 15px 0;
}

/* --- Submenu (Alt Menü) Ayarları --- */
.submenu {
    display: none;
    background: #fafafa;
    flex-direction: column;
}

.sidebar.collapsed .submenu {
    display: none !important;
}

.submenu a {
    display: block;
    padding: 10px 20px 10px 58px;
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    transition: 0.2s;
}

.submenu a:hover { color: var(--primary-color); background: #f8fafc; }

/* --- TAMİR KISMI (YAPUŞMAYI VE İKONLARI BİTİREN KISIM) --- */

/* index.php'deki <main> etiketini sağa iter */
main {
    
    padding: 20px !important; /* İstediğin o sağdan soldan 20px boşluk */
    width: calc(100% - var(--sidebar-width)) !important; /* Ekranı tam kapla ama taşma */
    transition: var(--transition) !important;
    display: block !important;
}

/* Sidebar kapandığında main içeriği sola kayar */
.sidebar.collapsed ~ main {
    margin-left: var(--sidebar-collapsed-width);
}

/* O gıcık çift ikonu (span olanı) yok eder */
.menu-group span.chev {
    display: none !important;
}

/* Gerçek FontAwesome okunu sağa çiviler */
.menu-group .chev {
    margin-left: auto !important;
    display: inline-block !important;
}
/* --- ANA İÇERİK DÜZENİ --- */
main.main-content {
    padding: 30px !important;
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Sayfa Başlığı ve Butonlar */
.tour-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.tour-page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.tour-page-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
}

.action-btn.ai { background: #eef2ff; color: #4f46e5; }
.action-btn.create { background: #4f46e5; color: #fff; }

/* --- TUR TABLOSU (BOARD) --- */
.tours-board {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Filtre Alanı */
.filter-attributes {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.default-input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 250px;
}

/* Tablo Satır Yapısı */
.filter-item {
    display: grid;
    grid-template-columns: 50px 70px 2fr 1fr 100px 100px 120px 100px 100px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    transition: 0.2s;
}

.filter-item.header {
    background: #f8fafc;
    font-weight: 600;
    color: #64748b;
    border-radius: 8px;
}

.filter-item:hover:not(.header) {
    background-color: #fcfcfc;
}

/* Arama Kutusu ve İkon Hizalaması */
.filter-attributes-item.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-attributes-item.input-icon img.search {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    pointer-events: none; /* İkona tıklayınca inputu engellemesin */
    filter: grayscale(1); /* Resimdeki gibi gri ton */
}

.default-input {
    padding: 10px 15px 10px 40px !important; /* Sol taraftan ikona yer açtık */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 300px;
    outline: none;
    transition: border-color 0.2s;
}

.default-input:focus {
    border-color: #4f46e5;
}

/* --- GÖRSEL ÖĞELER --- */
.tour-photo {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
}

.price {
    font-weight: 600;
    color: #1e293b;
}

/* Switch Butonları */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: #4f46e5; }
input:checked + .slider:before { transform: translateX(20px); }

/* İşlem İkonları */
.action-icon {
    font-size: 18px;
    margin: 0 5px;
    cursor: pointer;
    color: #64748b;
}

.action-icon.red:hover { color: #ef4444; }
.action-icon:hover { color: #4f46e5; }