@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&display=swap');

/* General Styles */
:root {
    --primary-color: #4776E6;
    --primary-light: #e8f0ff;
    --primary-dark: #3264d0;
    --secondary-color: #FF5E62;
    --secondary-light: #fff5f5;
    --text-color: #333;
    --text-light: #6c757d;
    --bg-color: #f8f9fa;
    --border-radius: 16px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #4776E6, #8E54E9);
    --gradient-secondary: linear-gradient(135deg, #FF5E62, #FF9966);
    --box-shadow-hover: 0 15px 40px rgba(71, 118, 230, 0.2);
    --box-shadow-light: 0 8px 25px rgba(0, 0, 0, 0.05);
    --round-button-radius: 50%;
    --circle-dimension: 50px;
}

body, html {
    background-color: #f7f9fc !important;
    color: #333 !important;
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    height: 100vh;
}

/* YÜKLEME EKRANI STILLERİ */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f7f9fc;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease; /* visibility geçişi kaldırıldı */
}

.loading-hidden {
    opacity: 0 !important;
    pointer-events: none; /* Faded olduğunda tıklanamaz hale getirir */
    /* display: none JS tarafından transitionend sonrası ayarlanacak */
}

/* İçeriği başlangıçta gizle, JS ile göstereceğiz */
#content {
    opacity: 0;
    visibility: hidden; /* Başlangıçta gizli tut */
    transition: opacity 0.5s ease; /* visibility geçişi kaldırıldı */
}

.content-visible {
    opacity: 1 !important;
    visibility: visible !important; /* İçerik gösterilmeye hazır olduğunda görünür yap */
    /* transition-delay kaldırıldı */
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    position: relative;
    min-height: 100vh;
}

/* Content */
#content {
    width: 100%;
    transition: var(--transition);
    margin-left: 0;
    background-color: #f7f9fc !important;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(71, 118, 230, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(142, 84, 233, 0.07) 0%, transparent 25%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 247, 255, 0.9) 100%);
    background-attachment: fixed;
    color: #333 !important;
    display: flex;
    flex-direction: column;
}

/* Kullanıcı bilgisinin yeni konumu (sağ üst) */
/* User Profile Component stilleri artık user_component/user-profile.css dosyasında */

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(71, 118, 230, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Calendar Icon */
.calendar-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    animation: scaleOnly 2s ease-in-out infinite alternate;
    box-shadow: 0 10px 25px rgba(71, 118, 230, 0.2);
}

.calendar-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(71, 118, 230, 0.1);
    animation: pulse 2s infinite;
    z-index: -1;
}

.calendar-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transform: translateY(0px);
}

.calendar-icon::after {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 2px dashed rgba(71, 118, 230, 0.3);
    animation: spin 30s linear infinite;
}

@keyframes scaleOnly {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* Accent circles */
.accent-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.5;
}

.accent-circle-1 {
    background: rgba(71, 118, 230, 0.15);
    width: 300px;
    height: 300px;
    top: 10%;
    right: -50px;
}

.accent-circle-2 {
    background: rgba(142, 84, 233, 0.15);
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: -100px;
}

/* Glass card effect */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    will-change: transform;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover) !important;
}

/* Statistics container */
.statistics-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    margin-top: 25px;
    animation: fadeIn 0.6s ease-out;
}

@media (max-width: 992px) {
    .statistics-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .statistics-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

.stat-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    flex-shrink: 0;
}

.stat-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.15;
    z-index: 0;
}

.stat-icon.completed {
    color: #28a745;
}

.stat-icon.progress {
    color: #17a2b8;
}

.stat-icon.remaining {
    color: #dc3545;
}

.stat-icon.timer {
    color: #fd7e14;
}

.stat-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Schedule navigation */
.schedule-navigation {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow-light);
}

.schedule-navigation h3 {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.day-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.day-date {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

@media (min-width: 481px) {
    .schedule-navigation .d-flex {
        flex-direction: row;
    }
    
    .schedule-navigation h3 {
        font-size: 1.2rem;
        flex-grow: 0;
        white-space: nowrap;
    }
}

/* Users inspection list */
.users-inspection-list {
    padding: 10px 0;
}

.user-inspection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #e9ecef;
    will-change: transform;
}

.user-inspection-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.user-name-inspection {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name-inspection > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name-inspection img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.inspection-status {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.inspection-status.geldi {
    background-color: #d4ffe4;
    color: #28a745;
}

.inspection-status.gelmedi {
    background-color: #ffe4e6;
    color: #dc3545;
}

.btn {
    border-radius: 50px;
    padding: 8px 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 5px 15px rgba(71, 118, 230, 0.3);
    transform: translateY(-2px);
}

.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Notification styles */
.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification.error {
    background: #dc3545;
}

@keyframes slideIn {
    0% {
        transform: translate(-50%, 100px);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.4;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Loading spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Media queries */
@media (max-width: 768px) {
    .calendar-icon {
        width: 70px;
        height: 70px;
    }
    
    .calendar-icon i {
        font-size: 2rem;
    }
    
    .statistics-container {
        gap: 10px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .schedule-navigation h3 {
        font-size: 1rem;
    }
    
    .day-name {
        font-size: 1rem;
    }
    
    .day-date {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    .schedule-navigation button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .user-inspection-item {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .inspection-status {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .schedule-navigation {
        padding: 15px;
    }
    
    .schedule-navigation .d-flex {
        display: grid;
        grid-template-areas: 
            "title title"
            "prev next";
        gap: 15px;
        align-items: center;
    }
    
    .schedule-navigation h3 {
        grid-area: title;
        text-align: center;
        margin-bottom: 0 !important;
    }
    
    .day-name {
        font-size: 0.9rem;
    }
    
    .day-date {
        font-size: 0.75rem;
        padding: 2px 8px;
    }
    
    .schedule-navigation #prevDay {
        grid-area: prev;
        width: 100%;
        justify-content: center;
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .schedule-navigation #nextDay {
        grid-area: next;
        width: 100%;
        justify-content: center;
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .schedule-navigation button i {
        font-size: 0.9rem;
    }
}

/* Sol Üst Geri Butonu Stili */
.back-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.3);
}

/* Arama Kutusu Stilleri */
.search-box-improved {
    position: relative;
    min-width: 220px;
    flex: 1;
}

.search-box-improved input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 30px;
    border: 1px solid #eaeaea;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-box-improved input:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(71, 118, 230, 0.15);
    outline: none;
}

.search-box-improved .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
}

.search-box-improved input:focus + .search-icon {
    color: var(--primary-color);
}

/* Filtreleme Dropdown Stilleri */
.filter-menu-compact {
    min-width: 220px;
    max-width: 280px;
    font-size: 0.9rem;
}

.filter-menu-compact .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-menu-compact .dropdown-item:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

.filter-menu-compact .dropdown-item:hover i {
    color: var(--primary-color) !important;
}

.filter-menu-compact .dropdown-item i {
    color: inherit;
    transition: color 0.2s ease;
}

.filter-menu-compact .dropdown-divider {
    margin: 0.25rem 0;
}

.filter-category-toggle {
    font-weight: 600;
    color: var(--primary-color) !important;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.filter-category-toggle:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

.filter-category-toggle:hover i {
    color: var(--primary-color) !important;
}

.filter-category-toggle i {
    color: inherit;
    transition: color 0.2s ease;
}

.filter-category-toggle i.bi-chevron-down {
    transition: transform 0.3s ease, color 0.2s ease;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.filter-category-toggle:hover i.bi-chevron-down {
    color: var(--primary-color) !important;
}

.filter-category-toggle[aria-expanded="true"] i.bi-chevron-down {
    transform: rotate(180deg);
}

.filter-menu-compact .collapse {
    background-color: rgba(0, 0, 0, 0.02);
}

.filter-menu-compact .collapse .dropdown-item {
    padding: 0.4rem 1rem 0.4rem 2.5rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.filter-menu-compact .collapse .dropdown-item:hover {
    background-color: var(--primary-light);
    border-left-color: var(--primary-color);
    padding-left: 2.8rem;
    color: var(--primary-color) !important;
}

.filter-menu-compact .collapse .dropdown-item:hover i {
    color: var(--primary-color) !important;
}

.filter-menu-compact .collapse .dropdown-item i {
    color: inherit;
    transition: color 0.2s ease;
}

.filter-menu-compact .filter-option.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.filter-menu-compact .filter-option.active::before {
    content: "✓";
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Aktif Filtre Badge */
#activeFilterBadge .badge {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 20px;
}

#activeFilterBadge .btn-close {
    padding: 0.25rem 0.5rem;
    opacity: 0.8;
}

#activeFilterBadge .btn-close:hover {
    opacity: 1;
}

/* Sınıf Badge Stili - Öğrenci Listesinde */
.user-name-inspection .badge {
    margin-top: 4px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .search-box-improved {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .filter-menu-compact {
        min-width: 200px;
        max-width: 250px;
        font-size: 0.85rem;
    }
    
    .filter-menu-compact .dropdown-item {
        padding: 0.4rem 0.8rem;
    }
    
    .filter-menu-compact .collapse .dropdown-item {
        padding: 0.35rem 0.8rem 0.35rem 2rem;
    }
}