/* Admin Panel Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    z-index: 1000;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Dropdown Menu */
.sidebar-menu .nav-item {
    position: relative;
}

.sidebar-menu .dropdown-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #5a6268;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 0 8px 8px 0;
    border: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu .dropdown-menu .dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
    white-space: nowrap;
    border: none;
    background: transparent;
}

.sidebar-menu .dropdown-menu .dropdown-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-menu .dropdown-menu .dropdown-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.sidebar-menu .nav-item:hover .dropdown-menu {
    display: block;
}

.sidebar-menu .dropdown-menu .dropdown-item.active {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar-menu li a i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.sidebar-menu li:hover a,
.sidebar-menu li.active a {
    background-color: rgba(255,255,255,0.1);
}

/* Main Content */
.admin-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s;
}

/* Top Bar */
.admin-topbar {
    background-color: #fff;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #667eea;
}

.topbar-left h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-info span {
    color: #7f8c8d;
    font-weight: 500;
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
}

/* İstatistik Kartları */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.stat-icon.blue { background-color: #3498db; }
.stat-icon.green { background-color: #27ae60; }
.stat-icon.purple { background-color: #9b59b6; }
.stat-icon.orange { background-color: #e67e22; }
.stat-icon.red { background-color: #e74c3c; }
.stat-icon.teal { background-color: #16a085; }
.stat-icon.indigo { background-color: #3f51b5; }
.stat-icon.yellow { background-color: #f39c12; }

.stat-info h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h5 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.card-header i {
    margin-right: 8px;
    color: #667eea;
}

.card-body {
    padding: 20px;
}

/* Tablolar */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    vertical-align: middle;
    color: #5a6c7d;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Top Products List */
.top-products-list {
    max-height: 300px;
    overflow-y: auto;
}

.top-product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
}

.top-product-item:last-child {
    border-bottom: none;
}

.product-rank {
    width: 30px;
    height: 30px;
    background-color: #667eea;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.product-info h6 {
    margin: 0;
    color: #2c3e50;
    font-weight: 500;
}

.product-info span {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Low Stock List */
.low-stock-list {
    max-height: 300px;
    overflow-y: auto;
}

.low-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
}

.low-stock-item:last-child {
    border-bottom: none;
}

.stock-info h6 {
    margin: 0;
    color: #2c3e50;
    font-weight: 500;
}

.stock-count {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form Stilleri */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
}

/* Butonlar */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background-color: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #f39c12;
    color: #fff;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-info {
    background-color: #3498db;
    color: #fff;
}

.btn-info:hover {
    background-color: #2980b9;
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Badge */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Alert */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination .page-link {
    border: none;
    color: #667eea;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #667eea;
    color: #fff;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 20px;
}

/* Product Gallery */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    padding-bottom: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(231, 76, 60, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-bottom: 10px;
    }
    
    .dashboard-content {
        padding: 20px 15px;
    }
    
    .admin-topbar {
        padding: 15px;
    }
    
    .admin-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: left;
    }
    
    .card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .topbar-left h4 {
        font-size: 1rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #bdc3c7;
}

.empty-state h4 {
    margin-bottom: 10px;
    color: #5a6c7d;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Print Styles */
@media print {
    .admin-sidebar,
    .admin-topbar,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .admin-content {
        margin-left: 0 !important;
    }
    
    .dashboard-content {
        padding: 0 !important;
    }
}