﻿/* GENEL SAYFA AYARLARI */
body {
    margin: 0;
}

/* ANA KAPSAYICI */
.main-container {
    display: flex;
    height: 100vh;
}
/* NAVBAR CSS */
.top_navbar {
    position: fixed;
    top: 0;
    height: 60px;
    width: 100%;
    background: #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 25px;
    box-shadow: 1px 0 2px rgba(0,0,0,0.125);
    z-index: 1000;
}

    .top_navbar .menu {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .top_navbar .hamburger {
        font-size: 18px;
        cursor: pointer;
        color: #7e7e7e;
    }

        .top_navbar .hamburger:hover {
            color: #7ba3f0;
        }

.nav-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .nav-user a {
        color: #7e7e7e;
        text-decoration: none;
        font-size: 18px;
        transition: color 0.2s;
    }
    .nav-user .logout-icon {
        color: #e11d48;
    }
    .nav-user .logout-icon:hover {
        color: #b41739;
    }

    .nav-user a:hover {
        color: #7ba3f0;
    }

    .nav-user-icon {
        color: #7e7e7e;
        text-decoration: none;
        transition: color 0.2s;
    }


    .nav-user-icon:hover {
        color: #7ba3f0;
    }

/* Tema Switch Butonu */
.theme-toggle {
    background: none;
    border: none;
    color: #7e7e7e;
    font-size: 18px;
    cursor: pointer;
    padding: 0px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: #7ba3f0;
}

/* User Dropdown */
.user-dropdown-container {
    position: relative;
}

.user-avatar {
    cursor: pointer;
}



.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #2c2c2c;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    display: none;
    z-index: 1002;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1c1c1c;
}

.user-dropdown-header i {
    font-size: 32px;
    color: #7e7e7e;
}

.user-info {
    flex: 1;
}

.user-name {
    color: #e7e7e7;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
}

.user-email {
    color: #7e7e7e;
    font-size: 10px;
}

.user-dropdown-divider {
    height: 1px;
    background: #3c3c3c;
    margin: 8px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #7e7e7e;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 12px;
}

.user-dropdown-item:hover {
    background-color: #3c3c3c;
    color: #e7e7e7;
}

.user-dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Navbar brand (sadece desktopta görünsün) */
.navbar-brand {
    color: #e7e7e7;
    text-decoration: none;
    margin-left: 27px;
    font-size: 18px;
    font-weight: 600;
} 
.navbar-brand:hover {
    color: #a8c7fa;
}

@media (max-width: 767.98px) {
    .desktop-home-link {
        display: none;
    }
}

@media (min-width: 768px) {
    .desktop-home-link {
        display: inline-block;
    }
}



/* SIDEBAR AYARLARI */
.sidebar {
    font-family: 'Stack Sans Text', sans-serif;
    width: 250px;
    background-color: #1c1c1c;
    color: #7e7e7e;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 60px;
    left: 0;
    height: 100%;
    z-index: 1001;
}

    .sidebar.active {
        width: 70px;
    }

        .sidebar.active ~ .top_navbar {
            width: 100% ;
        }

/* İçerik alanı */
.content {
    margin-left: 250px;
    margin-top: 60px;
    padding: 20px;
}

.sidebar.active ~ .content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* BAŞLIK */
.sidebar-header {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    color: #7e7e7e;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

    .sidebar-header .header-text {
        display: inline-block;
    }

    .sidebar-header .header-icon {
        display: none;
        font-size: 22px;
    }

.sidebar.active .header-text {
    display: none;
}

.header-icon.hamburger {
    display: none;
}

.sidebar.active .header-icon {
    display: inline-block;
}

/* Menü */
.sidebar-menu {
    flex-grow: 1;
    padding: 0 10px;
}

.menu-section-title {
    font-size: 11px;
    font-weight: bold;
    margin: 15px 0 10px;
    color: #bdc3c7;
    padding-left: 10px;
    transition: 0.3s;
}

.sidebar.active .menu-section-title {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 8px;
    color: #7e7e7e;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

    .menu-item:hover {
        background-color: #282828;
        padding-left: 20px;
        color: #7ba3f0;
        color: linear-gradient(135deg, #a8c7fa 0%, #7ba3f0 100%);
    }

.icon-container {
    width: 25px;
    text-align: center;
    margin-right: 10px;
    transition: margin 0.3s;
}

.item-text {
    transition: opacity 0.3s;
}

.sidebar.active .item-text {
    display: none;
}

.menu-divider {
    border: 0;
    height: 1px;
    background: #7f8c8d;
    margin: 15px 10px;
}

/* ALT KULLANICI PROFİLİ */
.sidebar-footer {
    border-top: 1px solid #7f8c8d;
    padding: 15px 20px;
    transition: 0.3s;
}




/* Toggle Butonu (Mobil İçin) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: #2c3e50;
    color: #7e7e7e;
    border: none;
    font-size: 13px;
    cursor: pointer;
    z-index: 1002;
    border-radius: 5px;
    padding: 8px 10px;
}

/* --- RESPONSIVE TASARIM --- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 60px;
        height: 100%;
        transition: left 0.3s ease;
    }

        .sidebar.active {
            left: 0px;
        }

    .content {
        width: auto;
        padding: 20px;
    }
    .top_navbar {
        left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        display: block;
    }
}

@media(max-width:766px) {
    .sidebar.active {
        display: none;
    }
        .sidebar.active ~ .content {
            margin-left: 0;
            width: 100%;
        }

    .sidebar ~ .content{
        margin-left:0px;
    }
    .sidebar {
        width: 100%;
        z-index: 1001;
    }
    body.no-scroll {
        overflow: hidden;
    }
}

/* ========== AÇIK TEMA STİLLERİ ========== */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-body:#f8f7fa;
    --bg-tertiary: #e8e8e8;
    --text-primary: #1c1c1c;
    --text-secondary: #4a4a4a;
    --text-tertiary: #7e7e7e;
    --border-color: #d0d0d0;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body {
    background-color: var(--bg-body);
    color: var(--text-primary);
}
[data-theme="light"] .logout-icon {
    color: #e11d48;
}
[data-theme="light"] .logout-icon:hover {
    color: #b41739;
}

[data-theme="light"] .top_navbar {
    background: var(--bg-primary);
    box-shadow: 0 2px 4px var(--shadow);
}

[data-theme="light"] .top_navbar .hamburger {
    color: var(--text-secondary);
}

[data-theme="light"] .top_navbar .hamburger:hover {
    color: #7ba3f0;
}

[data-theme="light"] .navbar-brand {
    color: var(--text-primary);
}

[data-theme="light"] .navbar-brand:hover {
    color: #7ba3f0;
}

[data-theme="light"] .nav-user a {
    color: var(--text-secondary);
}

[data-theme="light"] .nav-user a:hover {
    color: #7ba3f0;
}

[data-theme="light"] .theme-toggle {
    color: var(--text-secondary);
}

[data-theme="light"] .theme-toggle:hover {
    color: #7ba3f0;
}

[data-theme="light"] .sidebar {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    box-shadow: 0px 0px 0px -2px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .menu-section-title {
    color: var(--text-secondary);
}

[data-theme="light"] .menu-item {
    color: var(--text-secondary);
}

[data-theme="light"] .menu-item:hover {
    background-color: var(--bg-tertiary);
    color: #7ba3f0;
}

[data-theme="light"] .user-dropdown {
    background: var(--bg-primary);
    box-shadow: 0 4px 12px var(--shadow);
}

[data-theme="light"] .user-dropdown-header {
    background: var(--bg-secondary);
}

[data-theme="light"] .user-dropdown-header i {
    color: var(--text-secondary);
}

[data-theme="light"] .user-name {
    color: var(--text-primary);
}

[data-theme="light"] .user-email {
    color: var(--text-secondary);
}

[data-theme="light"] .user-dropdown-item {
    color: var(--text-secondary);
}

[data-theme="light"] .user-dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="light"] .content {
    background-color: var(--bg-secondary);
}

/* ChangePassword sayfasında sidebar'ı devre dışı bırak */
.disabled-sidebar {
    pointer-events: none;
    opacity: 0.5;
}

.disabled-sidebar .menu-item {
    cursor: not-allowed !important;
    pointer-events: none;
}

.disabled-sidebar .menu-item:hover {
    background-color: transparent !important;
    padding-left: 15px !important;
    color: inherit !important;
}
