﻿/* Ana yapıyı tam ekran yüksekliğine göre ayarla */
body, html {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* ---------- Sidebar  ---------- */
.sidebar {
    height: 100vh;
    width: 15%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #343a40;
    padding-top: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}
.sidebar-toggle {
    display: none; /* masaüstünde gizle */
}
    /* Her ana menü grubunu ayırmak için li.nav-item */
    .sidebar .nav-item {
        border-top: 1px solid rgba(255, 255, 255, 0.2); /* İnce ve şeffaf çizgi */
    }
    /* Ana menü gruplarını ayırmak için li.nav-item */
    .sidebar > ul > .nav-item {
        border-top: 1px solid rgba(255, 255, 255, 0.2); /* Grup üstü çizgi */
    }

        /* İlk ana menü grubu için çizgiyi kaldır */
        .sidebar > ul > .nav-item:first-child {
            border-top: none;
            padding-top: 0;
            margin-top: 0;
        }

    /* ---------- Scrollbar ---------- */
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: #000;
        border-radius: 10px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }

    /* ---------- Alt Menü Linkleri ---------- */
    .sidebar .sub_nav_item a {
        display: block;
        color: #fff;
        padding: 10px 15px;
        text-decoration: none;
        border-radius: 0 2px 2px 0; /* Köşeler yuvarlak */
        transition: all 0.3s ease;
        margin: 1px;
        margin-left:0;
    }
    /* Alt menü grupları arasında çizgi */
    .sidebar .collapse + .collapse {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 2px; /* opsiyonel boşluk */
        padding-top: 2px; /* opsiyonel boşluk */
    }


        /* Hover efekti - daha açık ve daha belirgin */
    /* Hover efekti */
    .sidebar a:hover {
        background: linear-gradient(135deg, #4da6ff, #cc3399);
        color: #fff;
    }

    /* Aktif link */
    .sub_nav_item a.active {
        background: linear-gradient(135deg, #1e90ff, #cc3399);
        color: #fff;
        /*font-weight: bold;*/
    }
.sub_nav_item {
    border-left: 5px solid #1e90ff;
    /*border-right: 3px solid #1e90ff;*/
  
}

    .sub_nav_item:first-child {
        border-top: 1px solid rgba(30, 144, 255, 1);
        border-radius: 15px 0 0 0;
    }

        .sub_nav_item:first-child a:hover, .sub_nav_item:first-child a.active {
            border-radius: 11px 0 0 0;
        }
    .sub_nav_item:last-child {
        border-bottom: 1px solid rgba(30, 144, 255, 1);
        border-radius: 0 0 0 15px;
    }
        .sub_nav_item:last-child a:hover, .sub_nav_item:last-child a.active {
            border-radius: 0 0 0 11px;
        }

    /* Alt menüsü olan linkler */
    .sidebar .nav-item.has-submenu > a {
        position: relative;
        display: block; /* clearfix etkisi için */
    }

        /* Chevron sağda, akışa dokunmadan */
    .sidebar .nav-item > a .chev {
        float: right;
        transition: transform 0.3s ease;
    }

    /* Alt menü açıkken çevir */
    .sidebar .nav-item > a[aria-expanded="true"] .chev {
        transform: rotate(90deg);
    }
  


@media (max-width: 768px) {
    .navbar-left {
        display: none;
    }
    /* Mobilde masaüstü navbar gizli */
    .content {
        margin-left: 0 !important; /* Yan menü genişliğine göre ayarlayın */
    }
    .navbar {
        margin-left: 0 !important; /* Yan menü genişliğine göre ayarlayın */
        position: fixed; /* Üst menüyü sabitleyin */
        top: 0;
        width: 100% !important; /* Yan menü genişliği kadar çıkartın */
        z-index: 1000; /* Üst menünün diğer elemanların üstünde görünmesi için */
    }

    .sidebar {
        width: 250px;
        transform: translateX(-100%);
        z-index: 1100;
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1200;
        background-color: #343a40;
        color: #fff;
        border: none;
        padding: 8px 10px;
        font-size: 20px;
        border-radius: 4px;
        cursor: pointer;
    }
    .navbar .nav-item > a{
        color:white;
    }

    .navbar .nav-item.has-submenu > a {
        position: relative;
        display: block; /* clearfix etkisi için */
    }

    /* Chevron sağda, akışa dokunmadan */
    .navbar .nav-item > a .chev {
        float: right;
        transition: transform 0.3s ease;
    }
    .navbar .nav-item > a[aria-expanded="true"] .chev {
        transform: rotate(90deg);
    }
    .sub_nav_item {
        border-left: 5px solid #1e90ff;
        border-right: 3px solid #1e90ff;
    }

        .sub_nav_item:first-child {
            border-top: 1px solid rgba(30, 144, 255, 1);
            border-radius: 15px 15px 0 0;
        }

            .sub_nav_item:first-child a:hover, .sub_nav_item:first-child a.active {
                border-radius: 11px 0 0 0;
            }

        .sub_nav_item:last-child {
            border-bottom: 1px solid rgba(30, 144, 255, 1);
            border-radius: 0 0 15px 15px;
        }

            .sub_nav_item:last-child a:hover, .sub_nav_item:last-child a.active {
                border-radius: 0 0 0 11px;
            }
}


/* ---------- Sidebar  ---------- */

/* Ana container tüm ekranı kaplayacak */
.container {
    display: flex;
    overflow: hidden;
}

/* Yan menü için sabit konumlandırma */
.navbar-left {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 15%;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding-top: 60px;
    z-index: 1000;
}


/* İçerik kısmı tüm yüksekliği kaplasın */
.content {
    margin-left: 15%; /* Yan menü genişliğine göre ayarlayın */
    overflow-y: auto;
    overflow-x: auto;
}

/* Navbar style */
.navbar {
    margin-left: 15%; /* Yan menü genişliğine göre ayarlayın */
    position: fixed; /* Üst menüyü sabitleyin */
    top: 0;
    width: 85%; /* Yan menü genişliği kadar çıkartın */
    z-index: 1000; /* Üst menünün diğer elemanların üstünde görünmesi için */
}

.navbar-nav .nav-link {
    color: #ffffff !important;
}

.footer {
    margin-left: 250px; /* Yan menü genişliğine göre ayarlayın */
    padding: 10px; /* Aşağıya boşluk ekleyin */
    background-color: #f8f9fa; /* Arka plan rengi */
}

.form-label {
    padding-top: .5rem !important;
    padding-right: .5rem !important;
    text-align: right !important;
    line-height: 1em !important;
}

.backdrop {
    z-index: 999999999;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #000;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper {
    position: relative;
    width: 10vw;
    height: 10vw;
}

.icon-outline,
.icon-fill {
    font-size: 10vw;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
}

.icon-outline {
    color: transparent;
    -webkit-text-stroke: 2px white; /* sadece dış çizgi */
}

.icon-fill {
    color: white;
    clip-path: inset(0 0 100% 0); /* başta görünmesin */
    animation: fillDown 1s linear infinite;
}

@keyframes fillDown {
    0% {
        clip-path: inset(0 0 100% 0);
    }

    50% {
        clip-path: inset(0 0 0% 0);
    }

    100% {
        clip-path: inset(0 0 100% 0);
    }
}


.icon-small {
    font-size: 0.5rem;
    vertical-align:middle;
}


/* TOASTER */
.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: #ffffff; /* açık renk bar */
    width: 100%;
    transition: width linear;
    z-index: 1;
    border-radius: 0 0 0.25rem 0.25rem;
    margin-top: -4px;
}



/* TOASTER */


table#base_table tr:hover {
    box-shadow: 0 -5px 15px -5px rgba(0,0,0,0.5),
    /* alt gölge */
    0 5px 15px -5px rgba(0,0,0,0.5);
    position: relative; /* gölgenin görünmesi için gerekli olabilir */
    z-index: 1;
    background-color: rgba(0, 127, 185, 0.05);
}