.admin-container {
    display: flex;
    height: 100vh;
    background-color: #f8fafc;
}

.admin-sidebar {
    width: 250px;
    background-color: #1e3a8a;
    color: white;
    padding: 0;
}

.admin-logo {
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #1e40af;
}

.admin-logo img {
    height: 40px;
    background: white;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.admin-nav {
    padding: 1rem 0;
}

.nav-item {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background-color: #1e40af;
}

.admin-main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #1e3a8a;
    margin: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.products-table,
.orders-table,
.users-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #f8fafc;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    font-weight: 600;
    color: #374151;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
    background-color: #3b82f6;
    color: white;
}

.btn-danger {
    background-color: #ef4444;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-shipped {
    background-color: #dcfce7;
    color: #166534;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

.modal-content.large {
    max-width: 800px;
    width: 95%;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 1rem;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
    }
    
    .admin-nav {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .nav-item {
        white-space: nowrap;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    .status-pending_payment {
        background-color: #fef3c7;
        color: #92400e;
    }
    
    .status-pending {
        background-color: #e0e7ff;
        color: #3730a3;
    }
    .status-approved {
        background-color: #dcfce7;
        color: #15803d;
    }
    .status-processing {
        background-color: #dbeafe;
        color: #1e40af;
    }
    
    .status-shipped {
        background-color: #dcfce7;
        color: #166534;
    }
    
    .status-completed {
        background-color: #d1fae5;
        color: #065f46;
    }
    
    .status-cancelled {
        background-color: #fee2e2;
        color: #991b1b;
    }
    .sizes-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .sizes-grid label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        border: 1px solid #d1d5db;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s;
    }
    
    .sizes-grid label:hover {
        background-color: #f3f4f6;
    }
    
    .sizes-grid input[type="checkbox"] {
        margin: 0;
    }

    .current-images {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .current-image {
        position: relative;
        display: inline-block;
    }
    
    .current-image img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        border-radius: 8px;
        border: 2px solid #e5e7eb;
    }
    
    .current-image .remove-image {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #ef4444;
        color: white;
        border: none;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .current-image .remove-image:hover {
        background: #dc2626;
    }
    
    .image-placeholder {
        width: 100px;
        height: 100px;
        background: #f3f4f6;
        border: 2px dashed #d1d5db;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #6b7280;
        font-size: 0.875rem;
    }
}