:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-bg: #f9fafb;
    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: #374151;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--primary-color);
    padding-left: 1.75rem;
}

.sidebar-menu-item.active {
    background-color: rgba(99, 102, 241, 0.2);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-menu-item i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Top Header */
.top-header {
    background: white;
    height: var(--header-height);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: #e5e7eb;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Content Area */
.content-wrapper {
    padding: 2rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.1);
}

.stat-card.primary { border-left-color: var(--primary-color); }
.stat-card.success { border-left-color: var(--success-color); }
.stat-card.danger { border-left-color: var(--danger-color); }
.stat-card.warning { border-left-color: var(--warning-color); }
.stat-card.info { border-left-color: var(--info-color); }

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-card-title {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card.primary .stat-card-icon { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }
.stat-card.success .stat-card-icon { background: linear-gradient(135deg, var(--success-color), #059669); }
.stat-card.danger .stat-card-icon { background: linear-gradient(135deg, var(--danger-color), #dc2626); }
.stat-card.warning .stat-card-icon { background: linear-gradient(135deg, var(--warning-color), #d97706); }
.stat-card.info .stat-card-icon { background: linear-gradient(135deg, var(--info-color), #2563eb); }

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.stat-card-change {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-card-change.positive { color: var(--success-color); }
.stat-card-change.negative { color: var(--danger-color); }

/* Modern Cards */
.modern-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.1);
}

.card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-bg);
}

.card-title-modern {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tables */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: var(--light-bg);
}

.modern-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
    background-color: var(--light-bg);
    transform: scale(1.01);
}

/* Badges */
.badge-modern {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
.btn-modern {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Image modal stability */
.image-modal-content {
    border-radius: 12px;
    overflow: hidden;
    border: none;
}
.image-modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
}
.image-modal-body {
    padding: 0;
    text-align: center;
    background: #0b1120;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 80vh;
    overflow: hidden;
}
.image-modal-body img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}
.image-modal-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
}
.image-modal .modal-dialog {
    max-width: 1200px;
    margin: 32px auto;
}
.image-modal .modal-dialog-centered {
    align-items: flex-start;
}

/* Modal scrollbar stabilizasyonu */
html {
    scrollbar-gutter: stable both-edges;
}
body.modal-open {
    overflow-y: scroll;
}

/* Progress Bars */
.progress-modern {
    height: 8px;
    border-radius: 50px;
    background-color: #e5e7eb;
    overflow: hidden;
}

.progress-bar-modern {
    height: 100%;
    border-radius: 50px;
    transition: width 0.6s ease;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Alert Cards */
.alert-card {
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid;
}

.alert-card.success {
    background: #ecfdf5;
    border-left-color: var(--success-color);
    color: #065f46;
}

.alert-card.danger {
    background: #fef2f2;
    border-left-color: var(--danger-color);
    color: #991b1b;
}

.alert-card.warning {
    background: #fffbeb;
    border-left-color: var(--warning-color);
    color: #92400e;
}

.alert-card.info {
    background: #eff6ff;
    border-left-color: var(--info-color);
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6b7280;
    margin: 0;
}
