/* Reset ve Temel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #17a2b8;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --border-radius: 10px;
    --box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 220px; /* Daha küçük sidebar */
}

/* Temel HTML ve Body Stilleri */
html {
    font-size: 14px; /* Daha küçük base font */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Container için temel sınırlamalar */
.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
    padding: 0 15px;
}

/* Login Sayfası */
.login-container {
    max-width: 400px;
    min-width: 300px;
    margin: 60px auto;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

/* KOMPAKT SIDEBAR */
.sidebar-modern {
    width: var(--sidebar-width);
    min-width: 200px; /* Daha küçük minimum genişlik */
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00b4db, #0083b0);
}

/* Kompakt Sidebar Header */
.sidebar-header {
    padding: 1.5rem 1rem 0.75rem; /* Daha az padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Daha küçük gap */
}

.brand-logo {
    width: 40px; /* Daha küçük logo */
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, #00b4db, #0083b0);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem; /* Daha küçük font */
    box-shadow: 0 6px 20px rgba(0, 180, 219, 0.4);
}

.brand-text h3 {
    color: white;
    font-weight: 700;
    font-size: 1rem; /* Daha küçük font */
    margin: 0;
    line-height: 1.2;
}

.brand-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem; /* Daha küçük font */
    margin: 0;
}

/* Kompakt Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0; /* Daha az padding */
    display: flex;
    flex-direction: column;
    gap: 0.15rem; /* Daha küçük gap */
    min-height: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem; /* Daha kompakt padding */
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    border-left: 3px solid transparent;
    margin: 0 0.5rem;
    border-radius: 0 8px 8px 0; /* Daha küçük border-radius */
    flex-shrink: 0;
    font-size: 0.85rem; /* Daha küçük font */
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px); /* Daha küçük transform */
    border-left-color: rgba(255, 255, 255, 0.3);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    color: white;
    border-left-color: #00b4db;
    box-shadow: inset 0 0 15px rgba(0, 180, 219, 0.1);
    transform: translateX(5px); /* Daha küçük transform */
}

.nav-icon {
    width: 18px; /* Daha küçük icon */
    height: 18px;
    min-width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem; /* Daha küçük margin */
    font-size: 0.9rem; /* Daha küçük font */
    transition: var(--transition);
}

.nav-item.active .nav-icon {
    color: #00b4db;
    transform: scale(1.05); /* Daha küçük scale */
}

.nav-label {
    flex: 1;
    font-weight: 500;
    font-size: 0.8rem; /* Daha küçük font */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-indicator {
    width: 4px; /* Daha küçük indicator */
    height: 4px;
    background: #00b4db;
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
}

.nav-item.active .nav-indicator {
    opacity: 1;
    transform: scale(1.1);
}

/* Kompakt Sidebar Footer */
.sidebar-footer {
    padding: 1rem; /* Daha az padding */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Daha küçük gap */
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 35px; /* Daha küçük avatar */
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem; /* Daha küçük font */
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 0.8rem; /* Daha küçük font */
    line-height: 1.2;
}

.user-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem; /* Daha küçük font */
    text-transform: capitalize;
}

.logout-btn {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.4rem; /* Daha küçük padding */
    border-radius: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem; /* Daha küçük font */
}

.logout-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.version-info {
    text-align: center;
}

.version-info span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem; /* Daha küçük font */
}

/* Navbar - Daha geniş alan için ayarlandı */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 0.875rem 0;
    margin-left: var(--sidebar-width);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
    position: sticky;
    top: 0;
    z-index: 999;
    width: calc(100% - var(--sidebar-width));
    left: var(--sidebar-width);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem; /* Biraz küçültüldü */
    background: linear-gradient(45deg, #fff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-left: 20px;
    white-space: nowrap;
}

/* Main Content - DAHA GENİŞ ALAN */
.main-content {
    padding: 1.5rem 2rem;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f8f9fa;
    transition: var(--transition);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    overflow-x: hidden;
}

/* Dashboard Grid - Daha fazla alan */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* Stat Cards */
.stat-card {
    text-align: center;
    padding: 1.5rem 1.25rem;
    border-radius: var(--border-radius);
    color: white;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--box-shadow);
    width: 100%;
    border: none;
}

/* Gradient Background Classes */
.stat-card.bg-custom-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.stat-card.bg-custom-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.stat-card.bg-custom-warning {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%) !important;
}

.stat-card.bg-custom-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%) !important;
}

.stat-card.bg-custom-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%) !important;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.stat-card .number {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0.4rem 0;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

.stat-card .label {
    font-size: 0.9rem;
    opacity: 0.95;
    position: relative;
    z-index: 2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .date {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.4rem;
    position: relative;
    z-index: 2;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    background: white;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    width: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    padding: 10px 24px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #2980b9) !important;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.5);
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: white;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white;
    border: none;
    padding: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.8px;
}

/* Mobile Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 0.875rem;
    left: 0.875rem;
    z-index: 1001;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: var(--transition);
    font-size: 0.9rem;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
}

/* Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

/* RESPONSIVE TASARIM */
@media (max-width: 1200px) {
    .sidebar-modern {
        transform: translateX(-100%);
        min-width: 220px;
    }
    
    .sidebar-modern.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-overlay.mobile-open {
        display: block;
    }
    
    .navbar,
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
    }
    
    .navbar {
        padding-left: 60px;
    }
    
    .main-content {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        min-height: 120px;
        padding: 1.25rem 1rem;
    }
    
    .stat-card .number {
        font-size: 1.8rem;
    }
    
    .stat-card i {
        font-size: 1.8rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
        padding-left: 60px;
    }
}

@media (max-width: 576px) {
    .login-container {
        margin: 40px 20px;
        padding: 30px 20px;
        min-width: 280px;
    }
    
    .stat-card {
        padding: 1rem;
        min-height: 110px;
    }
    
    .stat-card .number {
        font-size: 1.6rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        padding-left: 10px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.sidebar-modern::-webkit-scrollbar {
    width: 3px;
}

.sidebar-modern::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.sidebar-modern::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}

.sidebar-modern::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
