/* Genel Stiller */
:root {
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --secondary-color: #858796;
    --gray-100: #f8f9fc;
    --gray-200: #eaecf4;
    --gray-300: #dddfeb;
    --gray-400: #d1d3e2;
    --gray-500: #b7b9cc;
    --gray-600: #858796;
    --gray-700: #6e707e;
    --gray-800: #5a5c69;
    --gray-900: #3a3b45;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-600);
    background-color: var(--gray-100);
}

#wrapper {
    display: flex;
    position: relative;
}

#content-wrapper {
    background-color: var(--gray-100);
    width: 100%;
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}

#content {
    flex: 1 0 auto;
}

/* Sidebar - Mavi Gradient */
.sidebar {
    width: 14rem;
    min-height: 100vh;
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%) !important;
}

.sidebar,
.sidebar.accordion,
ul.sidebar,
ul.navbar-nav.sidebar,
.navbar-nav.bg-gradient-primary.sidebar {
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%) !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Desktop için sidebar toggle - ÇALIŞAN VERSİYON */
@media (min-width: 768px) {
    /* Sidebar başlangıçta görünür - FLEX İLE */
    #accordionSidebar {
        width: 14rem !important;
        min-width: 14rem !important;
        max-width: 14rem !important;
        height: 100vh;
        flex-shrink: 0;
        transition: all 0.3s ease !important;
        display: block !important;
    }
    
    /* Content başlangıçta sidebar genişliği kadar içeride */
    #content-wrapper {
        flex: 1;
        transition: all 0.3s ease !important;
    }
    
    /* Sidebar gizlendiğinde - COLLAPSE */
    body.sidebar-hidden #accordionSidebar {
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        overflow: hidden !important;
    }
    
    body.sidebar-hidden #content-wrapper {
        width: 100% !important;
    }
}

/* Default state için geçiş */
#accordionSidebar,
#content-wrapper,
.topbar {
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        z-index: 1000 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        width: 224px !important;
        min-width: 224px !important;
        max-width: 224px !important;
        display: block !important;
    }
    
    .sidebar.toggled {
        transform: translateX(0) !important;
    }
    
    /* Mobilde content-wrapper margin kaldır */
    #content-wrapper {
        margin-left: 0 !important;
    }
    
    /* Overlay için stil */
    #sidebar-overlay {
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

.bg-gradient-primary {
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%) !important;
    background-size: cover;
}

.sidebar .sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .05rem;
    z-index: 1;
}

.sidebar .sidebar-brand .sidebar-brand-icon i {
    font-size: 2rem;
}

.sidebar .sidebar-brand .sidebar-brand-text {
    display: block;
}

.sidebar hr.sidebar-divider {
    margin: 0 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.sidebar .sidebar-heading {
    text-align: center;
    padding: 0 1rem;
    font-weight: 800;
    font-size: .65rem;
    color: rgba(255, 255, 255, .4);
    text-transform: uppercase;
    letter-spacing: .1rem;
}

.sidebar .nav-item {
    position: relative;
}

.sidebar .nav-item .nav-link {
    text-align: left;
    padding: .75rem 1rem;
    width: 14rem;
    color: rgba(255, 255, 255, .8);
}

.sidebar .nav-item .nav-link:hover {
    color: #fff;
}

.sidebar .nav-item .nav-link.active {
    color: #fff;
    font-weight: 700;
}

.sidebar .nav-item .nav-link i {
    font-size: .85rem;
    margin-right: .25rem;
}

.sidebar .nav-item .nav-link span {
    font-size: .85rem;
    display: inline;
}

.sidebar .nav-item .collapse {
    position: absolute;
    left: calc(14rem + .5rem);
    z-index: 1;
    top: 2px;
}

.sidebar .nav-item .collapse .collapse-inner {
    border-radius: .35rem;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .15);
}

.sidebar .nav-item .collapse .collapse-inner .collapse-item {
    padding: .5rem 1rem;
    margin: .125rem 0;
    display: block;
    color: var(--gray-900);
    text-decoration: none;
    border-radius: .35rem;
    white-space: nowrap;
}

.sidebar .nav-item .collapse .collapse-inner .collapse-item:hover {
    background-color: var(--gray-200);
}

.sidebar #sidebarToggle {
    width: 2.5rem;
    height: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    cursor: pointer;
    background-color: rgba(255, 255, 255, .2);
    border: none;
}

.sidebar #sidebarToggle:hover {
    background-color: rgba(255, 255, 255, .25);
}

/* Topbar */
.topbar {
    height: 4.375rem;
}

.topbar .navbar-nav .nav-item .nav-link {
    height: 4.375rem;
    display: flex;
    align-items: center;
    padding: 0 .75rem;
}

.topbar .navbar-nav .nav-item .dropdown-menu {
    width: auto;
    right: 0;
}

/* Cards */
.card {
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .15);
    border: none;
}

.card .card-header {
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.border-left-primary {
    border-left: .25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: .25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: .25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: .25rem solid var(--warning-color) !important;
}

.border-left-danger {
    border-left: .25rem solid var(--danger-color) !important;
}

/* Login/Register */
.bg-login-image {
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-control-user {
    font-size: .8rem;
    border-radius: 10rem;
    padding: .75rem 1rem;
}

.btn-user {
    font-size: .8rem;
    border-radius: 10rem;
    padding: .75rem 1rem;
}

/* Takvim */
.calendar-table {
    width: 100%;
}

.calendar-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.calendar-day {
    height: 120px;
    vertical-align: top;
    padding: 8px;
    position: relative;
    border: 1px solid var(--gray-300);
}

.calendar-day.empty {
    background-color: var(--gray-100);
}

.calendar-day.today {
    background-color: #fffbcc;
}

.calendar-day .day-number {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.calendar-day.today .day-number {
    color: var(--primary-color);
}

.calendar-day .lessons-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-day .lesson-item {
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s;
}

.calendar-day .lesson-item:hover {
    opacity: 0.8;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    text-align: center;
    color: #fff;
    background: rgba(90, 92, 105, .5);
    line-height: 46px;
    border-radius: 50%;
}

.scroll-to-top:hover {
    background: var(--primary-color);
}

/* Footer */
.sticky-footer {
    padding: 2rem 0;
    flex-shrink: 0;
}

.sticky-footer .copyright {
    line-height: 1;
    font-size: .8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow-x: hidden;
        background: linear-gradient(180deg, #4e73df 10%, #224abe 100%) !important;
    }
    
    .sidebar.toggled {
        width: 14rem;
        background: linear-gradient(180deg, #4e73df 10%, #224abe 100%) !important;
    }
    
    #sidebarToggleTop {
        display: block;
    }
    
    .calendar-day {
        height: 80px;
        font-size: 0.85rem;
    }
    
    .calendar-day .lesson-item {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
}

@media (min-width: 768px) {
    .sidebar {
        width: 14rem !important;
        background: linear-gradient(180deg, #4e73df 10%, #224abe 100%) !important;
    }
    
    .sidebar .nav-item .collapse {
        position: relative;
        left: 0;
        z-index: 1;
        top: 0;
        animation: none;
    }
    
    .sidebar .nav-item .collapse .collapse-inner {
        box-shadow: none;
    }
}

/* Utility Classes */
.text-xs {
    font-size: .7rem;
}

.text-gray-300 {
    color: var(--gray-300) !important;
}

.text-gray-600 {
    color: var(--gray-600) !important;
}

.text-gray-800 {
    color: var(--gray-800) !important;
}

.text-gray-900 {
    color: var(--gray-900) !important;
}

.shadow {
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
}

/* Animasyonlar */
.animated--grow-in {
    animation-name: growIn;
    animation-duration: 200ms;
    animation-timing-function: transform cubic-bezier(.18, 1.25, .4, 1), opacity cubic-bezier(0, 1, .4, 1);
}

@keyframes growIn {
    0% {
        transform: scale(.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

