/**
 * Anaokulu Yönetim Sistemi
 * Ana CSS Dosyası - Bootstrap 5 ile Yenilenmiş
 */

 :root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --white-color: #fff;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --navbar-height: 60px;
    --content-transition: all 0.3s ease-in-out;
}

/* Genel Stiller */
body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    background-color: #f8f9fc;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: var(--content-transition);
    width: calc(100% - var(--sidebar-width));
}

.content {
    flex: 1;
    padding: 1.5rem;
    transition: var(--content-transition);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1040;
    transition: var(--content-transition);
    overflow-y: auto;
    background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .content-wrapper {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-body {
    padding: 1rem 0;
}

.sidebar .user-info {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1rem;
}

.sidebar .avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.5rem;
}

.avatar-text {
    width: 100%;
    height: 100%;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.sidebar .user-role {
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link {
    padding: 0.8rem 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
    border-radius: 0;
    margin: 0.1rem 0;
}

.sidebar .nav-link:hover, 
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
}

.sidebar .nav-link i {
    font-size: 1rem;
    width: 1.75rem;
    text-align: center;
    margin-right: 0.5rem;
}

.sidebar-collapsed .sidebar .nav-text,
.sidebar-collapsed .sidebar .user-info,
.sidebar-collapsed .sidebar-brand-text {
    display: none;
}

.sidebar-collapsed .sidebar .nav-link i {
    font-size: 1.2rem;
    margin-right: 0;
}

.sidebar-collapsed .sidebar .avatar {
    width: 40px;
    height: 40px;
}

/* Navbar */
.topbar {
    height: var(--navbar-height);
    background-color: white;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    z-index: 1030;
}

.topbar .navbar-brand {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.breadcrumb {
    margin-bottom: 0;
    background-color: transparent;
}

/* Avatar stiller */
.avatar {
    display: inline-block;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--primary-color);
}

.avatar-sm {
    width: 36px;
    height: 36px;
}

.avatar-lg {
    width: 100px;
    height: 100px;
}

.avatar-text {
    font-size: 1.2rem;
    color: white;
}

.avatar-lg .avatar-text {
    font-size: 2.5rem;
}

/* Kartlar */
.card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.card-header {
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
}

.card-header h6 {
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* Kenarlı Kartlar */
.card.border-left-primary {
    border-left: 0.25rem solid var(--primary-color);
}

.card.border-left-success {
    border-left: 0.25rem solid var(--success-color);
}

.card.border-left-info {
    border-left: 0.25rem solid var(--info-color);
}

.card.border-left-warning {
    border-left: 0.25rem solid var(--warning-color);
}

.card.border-left-danger {
    border-left: 0.25rem solid var(--danger-color);
}

/* Özel Tablo */
.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

.table th {
    background-color: #f8f9fc;
    font-weight: 600;
}

/* DataTables */
div.dataTables_wrapper div.dataTables_paginate {
    margin-top: 1rem;
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #eaecf4 !important;
    color: #333 !important;
    border-color: #eaecf4 !important;
}

/* Footer */
.footer {
    padding: 1.2rem 1.5rem;
    font-size: 0.875rem;
    border-top: 1px solid #e3e6f0;
    background-color: var(--white-color);
}

/* Login sayfası */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--primary-color);
    background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
}

.login-container {
    max-width: 400px;
    width: 100%;
    padding: 0 15px;
}

.login-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.1);
}

.login-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1.5rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

.login-footer {
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fc;
    border-top: 1px solid #e3e6f0;
}

/* Diğer yardımcı sınıflar */
.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.progress {
    height: 0.8rem;
    font-size: 0.65rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Duyarlı tasarım ayarları */
@media (max-width: 991.98px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar-show .sidebar {
        transform: translateX(0);
        width: 280px;
    }
    
    .sidebar-show .content-wrapper {
        margin-left: 0;
    }
    
    .topbar .navbar-brand {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .content {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Tooltip */
.tooltip {
    font-size: 0.8rem;
}

/* Animasyonlar */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Özel scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}